Running Macros in Access from Excel

S

Simon Dowse

Hi,

Is there nayway to write some script in Excel that opens
Access, runsa pre-recorded macro and then closes Access?
I also want this to be invisible to the user.

Many thanks in advance,
Simon
 
T

Tod

You can do something like this:

Sub ljd()

Set db = GetObject("C:\DatabasePath\DatabaseName.mdb")
db.DoCmd.RunMacro ("SampleMacro")
db.Quit
Set db = Nothing

End Sub

tod
 
Top