K
Kevin
I can override almost any Excel shortcut Key by using
Application.OnKey key, Macroname
For example, this uses the [CTRL+SHIFT+ 9 aka left/open parens "("] and
overrides the built-in command to Unhides any hidden rows within the
selection.
Application.OnKey "+^9", "MyMacro"
Now [CTRL+SHIFT+ (] runs MyMacro.
HOWEVER, no matter what I've tried, I cannot override
[CTRL+SHIFT+ 0] aka [CTRL+SHIFT+ )]
I tried to tell Excel to do nothing with the shortcuy key by using a blank
string
Application.OnKey "+^0", "" or
Application.OnKey "+^{)}", "" note: you have to use {} to esacpe the ")"
then set the shortcut key to be custom and run MyMacro.
Application.OnKey "+^0", "MyMacro" or
Application.OnKey "+^{)}", "MyMacro"
pressing [CTRL+SHIFT+ )] will cotinue to run the built-in command
Unhides any hidden rows within the selection.
Is there special something about [CTRL+SHIFT+ )] aka [CTRL+SHIFT+ 0] in
Excel 2007?
Application.OnKey key, Macroname
For example, this uses the [CTRL+SHIFT+ 9 aka left/open parens "("] and
overrides the built-in command to Unhides any hidden rows within the
selection.
Application.OnKey "+^9", "MyMacro"
Now [CTRL+SHIFT+ (] runs MyMacro.
HOWEVER, no matter what I've tried, I cannot override
[CTRL+SHIFT+ 0] aka [CTRL+SHIFT+ )]
I tried to tell Excel to do nothing with the shortcuy key by using a blank
string
Application.OnKey "+^0", "" or
Application.OnKey "+^{)}", "" note: you have to use {} to esacpe the ")"
then set the shortcut key to be custom and run MyMacro.
Application.OnKey "+^0", "MyMacro" or
Application.OnKey "+^{)}", "MyMacro"
pressing [CTRL+SHIFT+ )] will cotinue to run the built-in command
Unhides any hidden rows within the selection.
Is there special something about [CTRL+SHIFT+ )] aka [CTRL+SHIFT+ 0] in
Excel 2007?