I am trying to run an access macro from an excel application. i found the following code and tried to implement it but i keep getting a error 2046:
i go to references and set the references to :
Microsoft Access 12.0 Object Library
Any help would be greatly appreciated
i go to references and set the references to :
Microsoft Access 12.0 Object Library
Code:
Dim strDB As String
Dim A As Object
Application.ScreenUpdating = False
Set A = CreateObject("Access.Application")
strDB = "C:\od_track.mdb"
A.OpenCurrentDataBase strDB
A.Visible = False
A.DoCmd.RunMacro "OD PROJECTIONS MACRO"
'Note: i even tried "[OD PROJECTIONS MACRO]"
A.Quit
Comment