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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a macro from another database

Status
Not open for further replies.

camiller

IS-IT--Management
Jan 20, 2002
8
AU
Does anyone know if its possible to run a macro in database 1 from database 2?

Thanks
 
Try this:

' Include following in Declarations section of module.
Dim appAccess as Access.Application

Function OpenMacro(strMacroName as string)

Set appAccess = _
CreateObject("Access.Application")
' Open database in Microsoft Access window.
appAccess.OpenCurrentDatabase "path\YourDbName.mdb"
' Open Macro
appAccess.DoCmd.RunMacro strMacroName

End Function
 
read this thread

thread702-455987 Christiaan Baes
Belgium
"What a wonderfull world" - Louis armstrong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top