You will first need to set a reference to the Microsoft Access 9.0 Object Library under the Project Menu (VB 6) or the Tools menu (MS Excel etc Module window)
Sub Button1_Click()
Dim ac As Access.Application
Set ac = New Access.Application
ac.OpenCurrentDatabase ("C:\Development\Database\TEST\TEST.mdb"
'Use to run a Macro
ac.DoCmd.RunMacro "MACROTEST"
' or
'to run a function in a module
ac.Run ("testMe"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.