Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel2007 hotkey | New Users to Excel | |||
UDF not returning proper value - circular reference/multi workbook | Setting up and Configuration of Excel | |||
UDF not returning proper value - circular reference/multi workbook | Excel Programming | |||
Alt + Enter hotkey - what does this do? | Excel Programming | |||
Proper syntax to Set a Workbook Object? | Excel Programming |