Dim AccessApp
Set AccessApp = CreateObject("Access.Application")
AccessApp.Visible = True
AccessApp.OpenCurrentDatabase ("MyDBLocation.mdb")
AccessApp.DoCmd.SetWarnings False
AccessApp.DoCmd.RunMacro "macAutoRun"
AccessApp.DoCmd.Quit
AccessApp.DoCmd.Close
Set AccessApp = Nothing
Set AccessApp = CreateObject("Access.Application")
AccessApp.Visible = True
AccessApp.OpenCurrentDatabase ("MySecondDBLocation.mdb")
AccessApp.DoCmd.SetWarnings False
AccessApp.DoCmd.RunMacro "macAutoRun"
AccessApp.DoCmd.Quit
AccessApp.DoCmd.Close
Set AccessApp = Nothing
|