Hotkey in proper workbook

C

Charlotte E.

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
 
V

Vacuum Sealed

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.
 
C

Charlotte E.

Would have been easy, but neither ThisWorkbook or ActiveWorkbook support
the .MacroOptions method.


CE


Den 18.07.2012 15:33, Vacuum Sealed skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top