Link to home
Start Free TrialLog in
Avatar of sbornstein2
sbornstein2

asked on

Executing Access Macro in Visual Basic 6.0

I have code where I dont reference access in my project itself.  Can I execute a macro using the folliowing code?  I dont see the DoCmd options under my properties.  I would rather just use something similar to what I have and not reference access.  Here is what I use now:

        Set wsAccessWs = DBEngine.Workspaces(0)
        Set dbAccessDb = wsAccessWs.OpenDatabase(App.Path & gsDBName, False, False)

the dbAccessDb has .execute and then a query name.  But I dont see anything for executing a macro.  Thanks all.
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can use automation to instantiate an MSAccess object.  That will then allow you to invoke the .DoCMD method of the object to run the macro.