View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark Worthington Mark Worthington is offline
external usenet poster
 
Posts: 24
Default Application.Run Method

I have been using the Application.Run method for a long time, and
thought I was familiar with its syntax, namely :

Application.Run AnotherSub
Application.Run ("Add-In Name!Macro Name")
Application.Run "'Some book.xls'!TheMacro"

However, I need to pass some arguments to another procedure, and the
only way I can get it to work is as follows (transferring a string
variable from the 1st sub to the called sub) :

Application.Run "AnotherSub", My_Procedure_Name

It fails if I try what I expected, ie with the ( )

Application.Run ("AnotherSub", My_Procedure_Name)

But works if I use

Result = Application.Run ("AnotherSub ", My_Procedure_Name)

Now this isn't too important (hey, it works after I spent a lot of
time experimenting and searching the Goggle Groups), but am I missing
something? The Excel help indicates that the ( ) are required.

Any comments would be welcome in order to broaden my mind!

Regards,

Mark