Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to pass on a variable called by a subroutine in a macro written
in a different workbook. The variable is the filename of the workbook where the first macro is written. I didn't get an error with both of the following lines of code, but it just stopped running. Can you help? FirstWb = ThisWorkbook.Name ActiveWbMacro = SecondWb &* "!RunMacro2(""" & FirstWb & """)" Application.Run ActiveWbMacro I also tried: ActiveWbMacro = "'" & SecondWb &* "'!RunMacro2(""" & FirstWb & """)" Application.Run (ActiveWbMacro) Thanks for your help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Call a subroutine using variable subroutine name | Excel Discussion (Misc queries) | |||
How to check workbook is already opened before passing the workbook obj to a subroutine in Word | Excel Programming | |||
Auto Open and Passing variable value(s) to MS Word | Excel Programming | |||
Passing a variable to a Worksheet at open time | Excel Programming | |||
Passing a Variable from Worksheet to Workbook | Excel Programming |