Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I've been trying to solve this problem for a few days now. What is the correct syntax for Run, when executing a sub procedure in a DIFFERENT workbook under the following conditions: the procedure has arguments, and you are passing the code to run the macro with its arguments as 1 string: sub RunMacro(STRING) Application. Run STRING End Sub Where STRING has a value like "FILE.XLS!MACRO ARG1, ARG2" Thanks for any help you can give Regards, Ian |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
"FILE.XLS!MACRO", "ARG1", "ARG2" -- Regards Ron de Bruin http://www.rondebruin.nl wrote in message oups.com... Hi, I've been trying to solve this problem for a few days now. What is the correct syntax for Run, when executing a sub procedure in a DIFFERENT workbook under the following conditions: the procedure has arguments, and you are passing the code to run the macro with its arguments as 1 string: sub RunMacro(STRING) Application. Run STRING End Sub Where STRING has a value like "FILE.XLS!MACRO ARG1, ARG2" Thanks for any help you can give Regards, Ian |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You cannot do it in a single string, you need
sub RunMacro(STRING, arg1, arg2) Application. Run STRING,arg1,arg2 End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) wrote in message oups.com... Hi, I've been trying to solve this problem for a few days now. What is the correct syntax for Run, when executing a sub procedure in a DIFFERENT workbook under the following conditions: the procedure has arguments, and you are passing the code to run the macro with its arguments as 1 string: sub RunMacro(STRING) Application. Run STRING End Sub Where STRING has a value like "FILE.XLS!MACRO ARG1, ARG2" Thanks for any help you can give Regards, Ian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Correct Syntax | Excel Discussion (Misc queries) | |||
CORRECT SYNTAX FOR RUN... | Excel Programming | |||
Correct Syntax | Excel Programming | |||
Correct VBA syntax | Excel Discussion (Misc queries) | |||
Can't get this syntax correct, please help. | Excel Programming |