running excel macro from another workbook

前端 未结 4 1391
独厮守ぢ
独厮守ぢ 2020-12-01 19:19

I have a macro that is on a server. I need to be able to run it from different workstations that connect to this server.

Currently I am doing:

Applic         


        
4条回答
  •  無奈伤痛
    2020-12-01 20:07

    I think your syntax is missing the single quote characters:

    Application.Run ("'L:\database\lcmsmacro\macro1.xlsm'!macro_name") 
    

    Then, if you needed to pass parameters to it the syntax would be like this:

    Application.Run ("'L:\database\lcmsmacro\macro1.xlsm'!macro_name","param1","param2") 
    

提交回复
热议问题