Application.Run

G

greg

Hello,
I have been looking at Application.Run
I see the following code in MSDN.

In this example they use a template name.
Does that mean a template can be not opened? And it will run a method from
any template?

How about an add-on?
how about an xla?

can you have:
Application.Run MacroName:=<<xla>>& "." _
& <<module1>> & "." & <<some method>>

??

strTemplate = InputBox("Enter the template name")
strModule = InputBox("Enter the module name")
strMacro = InputBox("Enter the macro name")
strParameter = InputBox("Enter a parameter value")
Application.Run MacroName:=strTemplate & "." _
& strModule & "." & strMacro, _
varg1:=strParameter
 
P

Peter T

Sure -

sMacro = "myAddin.xla!mod_Procs.myMacro"
Application.Run sMarcro, arg1

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top