First of all I am using Access 97. Before using the following code I reference the Microsoft Excel 8.0 Object Library. The code doesn't run though- when I try to execute nothing happens. Here is the code:
Option Compare Database
Option Explicit
Sub RunXlMacro()
Dim appXL As Excel.Application
Dim wbk As Excel.Workbook
Set appXL = New Excel.Application
Set wbk = appXL.Workbooks.Open("D:DeleteMe.xls")
appXL.Run wbk.Name & "!Test"
wbk.Close False
appXL.Quit
Set appXL = Nothing
End Sub
I am new so please excuse my ignorance Thanks.
Option Compare Database
Option Explicit
Sub RunXlMacro()
Dim appXL As Excel.Application
Dim wbk As Excel.Workbook
Set appXL = New Excel.Application
Set wbk = appXL.Workbooks.Open("D:DeleteMe.xls")
appXL.Run wbk.Name & "!Test"
wbk.Close False
appXL.Quit
Set appXL = Nothing
End Sub
I am new so please excuse my ignorance Thanks.