Thread: ShortCut
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default ShortCut

You can catch the shortcut key with code like:

Option Explicit
Sub turnitoff()
Application.OnKey "^{107}", "" '+ key
Application.OnKey "^{109}", "" '- key
End Sub
Sub turniton()
Application.OnKey "^{107}"
Application.OnKey "^{109}"
End Sub

A search of google found this:
http://groups.google.co.uk/group/mic...e26a616e83 00

or
http://snipurl.com/xmti

From: Kazuyuki Housaka - view profile
Date: Fri, Dec 27 2002 12:02 pm
Groups: microsoft.public.excel.programming

Hello,
This works on my PC.

Application.OnKey "{107}", "Add_Macro" '+ key
Application.OnKey "{109}", "Subtract_Macro" '- key


0 {96}
1 {97}
2 {98}
3 {99}
4 {100}
5 {101}
6 {102}
7 {103}
8 {104}
9 {105}
+ {107}
- {109}


Hope this helps.



DM wrote:

Thanks for your answer...I know this way of doing...
but this Sub do not deActivate these shortcuts on my computer
even thouth it's worked well for othe shortcuts !

the keys ("+" or "-") are the one from the numeric section of the keyboard...

Am i the only one ?

'-------------------
Sub DeActivate()
Application.OnKey "^{+}", ""
End Sub
'-------------------

Thanks for your participation.

"Dave Peterson" a écrit dans le message de news:
...
You can use code to stop that dialog from showing:

Option Explicit
Sub DeActivate()
Application.OnKey "^{+}", ""
End Sub
Sub ReActivate()
Application.OnKey "^{+}"
End Sub

Read VBAs help for .onkey and you'll see more info.

DM wrote:

As supplement to this question :

Ctrl + Shift + "+"
Ctrl + "-"
Ctrl + "+"

Each ShortCut opens the same dialog box (dialog box to insert a line or a column)
i cannot desactivate any of them ....

Any solution to this case ?

Thanks in advance for your help.

Salutations,

"DM" a écrit dans le message de news:
...
Hi,

How to desactivate the ShortCut Ctrl + (dialog box to insert a line or column)

Thank for your collaboration.


--

Dave Peterson


--

Dave Peterson