Running an Access macro from VB

northy

Registered User.
Local time
Today, 22:56
Joined
Jul 30, 2001
Messages
16
I have managed to get a VB application to run an Excel macro using this code:

Dim oXL As Object
Set oXL = CreateObject("Excel.Application")
oXL.Workbooks.Open FileName:="Test.xls"
oXL.Application.Run "Test.xls!Module1.Macro1"
oXL.Quit
Set oXL = Nothing

Does anyone know the appropriate syntax to run an Access macro in the same way?
 
Thanks for the help but I don't think I explained what I am trying to do properly...

I need to call an Access macro from a completely seperate VB application (not a VBA module or another macro associated with the database). I have already managed to call an Excel macro so I assume there is equivalent code to do the same with Access.

Or will the code that you posted work from a seperate application after all? (the VB help cannot recognise the keywords)

Thanks again
 
Sorry, VB applications are beyond what I know. Anyone else?
 

Users who are viewing this thread

Back
Top Bottom