G
GotDebt
Greetings,
I am trying to link (web link) to an Excel file (Book1.xls) that will
open another Excel file (Book2.xls) then close itself (Book1.xls). It
will work when I run just Book1.xls but if I load it through IE as a
link, it does not seem to want to work (asks to save the file or opens
book1.xls twice, or out of memory errors).
I basically want to use Book1.xls to determine where to load book2.xls
(either from the Web or from the local PC).
Here is the code that I have for Book1.xls:
Sub auto_open()
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim i As Integer
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlWB = xlApp.Workbooks.Open("c:\Book2.xls")
Set xlApp = Nothing
Set xlWB = Nothing
Excel.Application.ThisWorkbook.Saved = True
Excel.Application.Quit
End Sub
Any ideas?
I am trying to link (web link) to an Excel file (Book1.xls) that will
open another Excel file (Book2.xls) then close itself (Book1.xls). It
will work when I run just Book1.xls but if I load it through IE as a
link, it does not seem to want to work (asks to save the file or opens
book1.xls twice, or out of memory errors).
I basically want to use Book1.xls to determine where to load book2.xls
(either from the Web or from the local PC).
Here is the code that I have for Book1.xls:
Sub auto_open()
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim i As Integer
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlWB = xlApp.Workbooks.Open("c:\Book2.xls")
Set xlApp = Nothing
Set xlWB = Nothing
Excel.Application.ThisWorkbook.Saved = True
Excel.Application.Quit
End Sub
Any ideas?