I am having problems calling a macro that exists in a different workbook.
Workbook "A" is the current workbook.
Workbook "B" contains the macro(named "btnGo") I want to execute from workbook "A". (The correct name of workbook "B" is in the variable vFileAbreName.)
The code in workbook "A" is,
vForeignMacro = (vFileAbreName + "!btnGo")
application.Run vForeignMacro
Workbook "B" is open and activated at the time of the call.
I have no problems manipulating cell values in workbook "B".
But I cannot run the macro of workbook "B"!!!!
I am getting a 1004 Cannot run macro error.
It says the macro may not be in this workbook, or macros may be disabled. Went through the formality of checking the Trust Center and all macros are enabled.
What am I missing???
Workbook "A" is the current workbook.
Workbook "B" contains the macro(named "btnGo") I want to execute from workbook "A". (The correct name of workbook "B" is in the variable vFileAbreName.)
The code in workbook "A" is,
vForeignMacro = (vFileAbreName + "!btnGo")
application.Run vForeignMacro
Workbook "B" is open and activated at the time of the call.
I have no problems manipulating cell values in workbook "B".
But I cannot run the macro of workbook "B"!!!!
I am getting a 1004 Cannot run macro error.
It says the macro may not be in this workbook, or macros may be disabled. Went through the formality of checking the Trust Center and all macros are enabled.
What am I missing???