Hi,
I try to run an Access macro from an Excel macro.
I've found some helping tips, but it still doesn't work.
The relating part:
Dim appAccess As Object
Set appAccess = CreateObject("Access.Application")
appAccess.opencurrentdatabase "G:\Risk Management\Common For Risk Management\Common\RPatadas\mlc08.accdb"
appAccess.Visible = True
appAccess.DoCmd.OpenForm "bank"
appAccess.DoCmd.RunMacro "start_all"
appAccess.CloseCurrentDatabase
MsgBox "Access is ready"
It opens the bank form, but does not run the start_all macro.
The error message is:
Run-time error '2485':
Microsoft Access cannot find the object 'start_all'
If I try to run it directly from Access, it works properly.
Thx for your replies!
Dori
I try to run an Access macro from an Excel macro.
I've found some helping tips, but it still doesn't work.
The relating part:
Dim appAccess As Object
Set appAccess = CreateObject("Access.Application")
appAccess.opencurrentdatabase "G:\Risk Management\Common For Risk Management\Common\RPatadas\mlc08.accdb"
appAccess.Visible = True
appAccess.DoCmd.OpenForm "bank"
appAccess.DoCmd.RunMacro "start_all"
appAccess.CloseCurrentDatabase
MsgBox "Access is ready"
It opens the bank form, but does not run the start_all macro.
The error message is:
Run-time error '2485':
Microsoft Access cannot find the object 'start_all'
If I try to run it directly from Access, it works properly.
Thx for your replies!
Dori