Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Hotkey in proper workbook

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Hotkey in proper workbook

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


CE


Den 18.07.2012 15:33, Vacuum Sealed skrev:
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel2007 hotkey L@ja New Users to Excel 0 January 29th 08 01:23 PM
UDF not returning proper value - circular reference/multi workbook Jeff Setting up and Configuration of Excel 1 February 1st 06 01:52 AM
UDF not returning proper value - circular reference/multi workbook Jeff Excel Programming 1 February 1st 06 01:52 AM
Alt + Enter hotkey - what does this do? R Avery Excel Programming 2 October 14th 04 05:23 PM
Proper syntax to Set a Workbook Object? Rick Stanford Excel Programming 2 September 13th 03 07:15 PM


All times are GMT +1. The time now is 01:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"