M
Magrathea
I have the following Excel VBA code snip that has worked well for several
months on a weekly basis.
Dim db1 As DAO.Database
Dim appAccess As Access.Application 'uses the TransferSpreadsheet method
of DoCmd.
......
Set appAccess = CreateObject("Access.application")
appAccess.OpenCurrentDatabase strFPName, False
Set db1 = appAccess.CurrentDb()
Recently it broke. The error message is:
-2147221163 Automation Error
Interface Not Registered.
The error happens at the Set db1. the currentdb() function is not
recognized.
AppAccess.OpenCurrentDatabase works because I can follow it successfully
with a Msgbox appAccess.CurrentProject.Name.
We tried reinstalling Office. No change.
It is using Access and Excel version 9.0.
Running on Windows 2000 SP4.
Tools>References>
has Excel 9.0, Access 9.0, DA0 3.60, OLE Automation. checked. Nothing
missing.
Any particular DLL's we should try to re-register?
I'm going to code around it using an Access table linked to an excel range
and run append queries. But I'd much rather fix what broke. Or at least
know what to fix the next time.
-Stephen Rasey
Houston
months on a weekly basis.
Dim db1 As DAO.Database
Dim appAccess As Access.Application 'uses the TransferSpreadsheet method
of DoCmd.
......
Set appAccess = CreateObject("Access.application")
appAccess.OpenCurrentDatabase strFPName, False
Set db1 = appAccess.CurrentDb()
Recently it broke. The error message is:
-2147221163 Automation Error
Interface Not Registered.
The error happens at the Set db1. the currentdb() function is not
recognized.
AppAccess.OpenCurrentDatabase works because I can follow it successfully
with a Msgbox appAccess.CurrentProject.Name.
We tried reinstalling Office. No change.
It is using Access and Excel version 9.0.
Running on Windows 2000 SP4.
Tools>References>
has Excel 9.0, Access 9.0, DA0 3.60, OLE Automation. checked. Nothing
missing.
Any particular DLL's we should try to re-register?
I'm going to code around it using an Access table linked to an excel range
and run append queries. But I'd much rather fix what broke. Or at least
know what to fix the next time.
-Stephen Rasey
Houston