views:

137

answers:

1

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:

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

The error message I am getting is "The macro may not be available in this workbook #1004"

I have already made sure that my security settings are set on the lowest level.

How do I run a macro from another workbook which is hosted on a different server?

would using add-ins help me?

+2  A: 

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") 
Fink
why do i need single quotes?
I__
Its the standard syntax for linking any workbooks for excel that are closed. For example if you were linking a cell to another cell in a different closed workbook, the syntax would look like this:'C:\Documents and Settings\mnbtjf01\Desktop\[myWorkbook.xls]Sheet1'!$F$15You could also go a step beyond, if you need more control over the networked spreadsheet. Here is a good resource:http://www.vbaexpress.com/kb/getarticle.php?kb_id=279
Fink