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

Re: Application.Run by Peter

Peter
Thu May 08 13:49:41 CDT 2008

Sure -

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

Regards,
Peter T


"greg" <iuouh@ghfhg.com> wrote in message
news:ebQA4WTsIHA.2064@TK2MSFTNGP05.phx.gbl...
> 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
>
>