From: Kevin on
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?








From: Bob Phillips on
Can't be, I have just tried it and it works fine here

application.OnKey "^+0","Test"

--

HTH

Bob

"Kevin" <Kevin(a)discussions.microsoft.com> wrote in message
news:4A961408-F953-4049-9404-2FF600DAE500(a)microsoft.com...
>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?
>
>
>
>
>
>
>
>