Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to execute macro in another database

Status
Not open for further replies.

101287

MIS
Apr 8, 2006
189
US
Can someone direct me to article, code etc. on how to execute a macro that is in another database. For example; I have open a specific database (1) and would like to connect to another datase base and execute a macro.

Guidance will be appreciated.

Luis
 
You can build a command line to open MS Access, open a specified database (with workgroup and logon credentials passed as parameters) and then then use the /x switch to specify a macro name.

The format of your command line is something along the lines of:

<MSAccess.exe filepath> <database filepath> <workgroup filepath> /user <user name> /pwd <user password> /x <macro name>

Once the command line is created execute it using the Shell() function.

Ed Metcalfe.

Please do not feed the trolls.....
 
Can you please provide additional information or an example? I tried to put the command together but has not being able to make it work.

Thank you for patence.
 
Thank you Ed. The article really help me understand your suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top