run macro from different database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to run a macro while working in a different database. I do not want to
have to open the databased run the macro then return to the other database.
 
sierralightfoot said:
I want to run a macro while working in a different database. I do not want to
have to open the databased run the macro then return to the other database.

You can write a procedure that will do this for you, like this:

Public Function runMacroOtherDB() As Boolean
Call Shell("C:\Program Files\Microsoft Office\OFFICE10\MSAccess.exe " & _
"C:\db1.mdb /x mcrOpenQuery1", vbMinimizedNoFocus)
runMacroOtherDB = True
End Function
 
Back
Top