M
Morris
Hi everyone,
Only yesterday I made some Excel operations in another database and
everything was working fine, so today I'm trying to do it in another
one and it fails.
I 've got Access 2003, open a 2000 version database. I choose
'Modules' from the left hand side, create a new module, put this code
in:
public sub subCreate()
Dim objXLApp As Object
Dim objXLWb As Object
Dim objSheet As Object
Set objXLApp = CreateObject("Excel.Application")
Set objXLWb = objXLApp.Application.Workbooks.Open("c:\temp\gps.xls")
Set objSheet = objXLWb.Worksheets(1)
(...)
end sub
And it stops on line: Set objXLWb =
objXLApp.Application.Workbooks.Open("c:\temp\gps.xls")
with an error: Runtime error 1004, Unable to get the 'Open' property
of the Workbooks class
the only difference to my yesterday's database is that this is being
run in a Module, not in Microsoft Office Access Class Objects, but can
I make it somehow work?
Cheers,
Morris
Only yesterday I made some Excel operations in another database and
everything was working fine, so today I'm trying to do it in another
one and it fails.
I 've got Access 2003, open a 2000 version database. I choose
'Modules' from the left hand side, create a new module, put this code
in:
public sub subCreate()
Dim objXLApp As Object
Dim objXLWb As Object
Dim objSheet As Object
Set objXLApp = CreateObject("Excel.Application")
Set objXLWb = objXLApp.Application.Workbooks.Open("c:\temp\gps.xls")
Set objSheet = objXLWb.Worksheets(1)
(...)
end sub
And it stops on line: Set objXLWb =
objXLApp.Application.Workbooks.Open("c:\temp\gps.xls")
with an error: Runtime error 1004, Unable to get the 'Open' property
of the Workbooks class
the only difference to my yesterday's database is that this is being
run in a Module, not in Microsoft Office Access Class Objects, but can
I make it somehow work?
Cheers,
Morris