Running a Macro from another DB.

mixedguy

Registered User.
Local time
Yesterday, 21:20
Joined
Jun 12, 2002
Messages
52
Hi,

How would I run a Macro residing on a network database from my macro residing on my Hard drive database?

Thanks in advance.
 
Running a macro in another Access DB

You'll probably need to use VB code to do this.

You could start a new module then put this code into it.

Code:
Public Sub run_Server_Macro()

    Dim servDB_path_name
    Dim servAPP As Access.Application

    servDB_Path_Name = "\\path\server_db_name.mdb"

    Set servAPP = GetObject(servDB_Path_Name, "ACCESS.Application")
    
    servAPP.DoCmd.RunMacro "name_of_server_macro"
    
    servAPP.Quit
    
    Set servAPP = Nothing

End Sub
 

Users who are viewing this thread

Back
Top Bottom