View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vacuum Sealed Vacuum Sealed is offline
external usenet poster
 
Posts: 259
Default Hotkey in proper workbook

On 18/07/2012 8:43 PM, Charlotte E. wrote:
I have a workbook containing a macro, which is activated by a hothey
combination (CTRL + SHIFT + N).

This hotkey combination is created with 'Application.MacroOptions' in
the Workbook_Open event.

And everything works fine :-)

But, if I open another workbook, which also uses this hotkey combination
for running some other macro, it goes wrong!

Even that the hotkeys are defined in their own workbooks, and the macros
are contained in their own workbooks, when hitting the hotkey in one
workbook, it will run the macro from the other workbook?!?

Why?
How to avoid this?


Thanks

CE

I suspect you should change the term "Application" as it is global and
will affect all workbooks inside Excel itself...

Try setting it to Active Workbook instead thus making it local to each....

HTH
Mick.