Execute a macro in another file with an argument

X

XP

Using Office 2003 and Windows XP;

I need to call a program from a currently active XL file to another XL file;
I know you can a syntax like:

Application.Run "'FullFileName'!MacroName"

However, I need to supply an argument in this call, but the following
doesn't work:

Application.Run "'FullFileName'!MacroName(MyArgument)"

MyArgument is a variable name; how can this be done?

Thanks much in advance.
 
D

Dave Peterson

application.run "'FullfileName'!macroname", myargument

But FullFileName should not include the path, right?
 

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