run macro from different database

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.
 
G

Granny Spitz via AccessMonster.com

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top