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
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