Help Please: Run Excel based sub from Access using GetObject
"Object does not support this property error 438."
Here is some simpler Access code I tested tonight and it too did not work.
As per articles expunging Excel from memory, I used late binding and set
no reference to the Excel Object library:
Sub Test()
Dim xlApp As Object
Dim oWb As Object
Dim oWs As Object
Set xlApp = GetObject("C:\Test\TestAutoma.xls")
Set oWb = xlApp.Workbook
Set oWs = xlApp.oWb("Sheet1")
xlApp.Visible = True
oWs.Visible = True
oWs.Application.Run "TestAutomation" 'modcycle module
End Sub
|