View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Steven M. Britton[_2_] Steven M. Britton[_2_] is offline
external usenet poster
 
Posts: 12
Default Call Macro from another WorkBook?

Jim,

Thanks for the reponse, no it's not behind a sheet. Although you made me
think, this is a Macro that has several subs. The Macro is called
Lifecycle_Processing and in that Macro I am trying to call the MYTD_Summary
sub routine. Does that have to be called differently?

It's strange cuz it will open the file BOM_Macros in a new Excel window, but
then gives me the error...



"Jim Cone" wrote:

Steven,

Is the macro code located in the module behind the sheet?
Code in a sheet module is "private" by default.
If so, the module name must be specified, (or move the code
to a general module).

....BOMMacros.xls!Sheet1.MYTD_Summary

Jim Cone
San Francisco, USA



"Steven M. Britton" wrote in
message ...
I am trying this:

Sub MYTD_Summary()
Application.Run "\\arlfs03\shared\Engineering\ENG\BOM Archive\BOM
Macros.xls!MYTD_Summary"
End Sub

But I get a Run-time error '1004'

The macro '\\arlfs03\shared\Engineering\ENG\BOM Archive\BOM
Macros.xls!MYTD_Summary' cannot be found.

If I assign the macro to the object it works fine - It's an oval I drew
using the drawing tools in Excel, not a command button.

What am I missing?
-snip-