MWSoccer18,
Different shortcut combinations?
Or
In a module put this sub.
Private Sub Chooser()
If Sheets("Sheet1") = ActiveSheet Then
Call test1
Else
Call test2
End If
End Sub
Use your shortcut combination to call Sub Chooser()
Henry
"MWSoccer18" wrote in message
...
There is no button involved. The macro is always executed through a
ctrl+shift+Z combination. Changing the macro name will only work if the
macro name in the current sheet alphabetically comes before the macro in
the
other sheet. But then...when you switch back to the other sheet...you
will
be executing the wrong macro in that sheet.
"Henry" wrote:
MWSoccer18,
Try changing one of the macro names and, of course, the code for the
associated button.
Henry
"MWSoccer18" wrote in message
...
If you have 2 Excel files open which both have macro's named the same
and
assigned to the same shortcut key...it does not execute the current
sheet's
macro. It runs the other sheets macro because it is listed first in
the
global macro listing.
Is there a way to make it run the macro from the workbook that you are
in?
ex.
I have 2 files...one called Test1.xls and the other Test2.xls....both
having
Macro's assigned to ctrl+shift+Z. If I'm in Test2.xls....it will run
the
Test1.xls macro.
Macro List
---------------------------
Test1.xls!Macro1
Macro1
|