Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel file only opens as read-only

Status
Not open for further replies.

coopsman

Technical User
Apr 5, 2002
9
US
I am running the following code which exports several files to Excel, then opens a master file with links to the exported excel files. The code works great, but I can only get the master file to open in read-only condition even though it is not a read-only file. Any suggestions on how to change the condition so the file may be edited and re-saved?

Private Sub Command95_Click()
Dim XL As Object
Dim tmpApp As New Excel.Application

DoCmd.RunMacro "New Corporate Report"


Set XL = CreateObject("Excel.Application")

XL.Workbooks.Open "k:\product reports\corporate report\macrocorp.xls"
XL.Run "newcorp"

SendKeys "Y"
tmpApp.Workbooks.Open FileName:="k:\product reports\corporate report\corprptnewtemplate.xls"
tmpApp.Visible = True
Set tmpApp = Nothing
End Sub
 
Are you sure it's not a template(.xlt?) Templates cannot be modified. See if you can open the file and SaveAs a non-template file.
VBSlammer
redinvader3walking.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top