LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default disabling shorcuts

I like this one for almost all of them Anand

Sub Disable()
Dim K, Key, Key2, I As Integer
On Error Resume Next

For Each Key In Array("+", "^", "%", "+^", "+%", "^%", "+^%")

K = Array("{BS}", "{BREAK}", "{CAPSLOCK}", "{CLEAR}", "{DEL}", _
"{DOWN}", "{END}", "{ENTER}", "~", "{ESC}", "{HELP}", "{HOME}", _
"{INSERT}", "{LEFT}", "{NUMLOCK}", "{PGDN}", "{PGUP}", _
"{RETURN}", "{RIGHT}", "{SCROLLLOCK}", "{TAB}", "{UP}")

For Each Key2 In K
Application.OnKey Key & Key2, ""
Next Key2

For I = 0 To 255
Application.OnKey Key & Chr$(I), ""
Next I

For I = 1 To 15
Application.OnKey Key & "{F" & I & "}", ""
Application.OnKey "{F" & I & "}", ""
Next I
Next
End Sub



Sub Enable()
Dim K, Key, Key2, I As Integer
On Error Resume Next

For Each Key In Array("+", "^", "%", "+^", "+%", "^%", "+^%")

K = Array("{BS}", "{BREAK}", "{CAPSLOCK}", "{CLEAR}", "{DEL}", _
"{DOWN}", "{END}", "{ENTER}", "~", "{ESC}", "{HELP}", "{HOME}", _
"{INSERT}", "{LEFT}", "{NUMLOCK}", "{PGDN}", "{PGUP}", _
"{RETURN}", "{RIGHT}", "{SCROLLLOCK}", "{TAB}", "{UP}")

For Each Key2 In K
Application.OnKey Key & Key2
Next Key2

For I = 0 To 255
Application.OnKey Key & Chr$(I)
Next I

For I = 1 To 15
Application.OnKey Key & "{F" & I & "}"
Application.OnKey "{F" & I & "}"
Next I
Next
End Sub

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Anand" wrote in message ...
Hi:

I have been using the following type of code
Application.OnKey "+^{'}", ""

How do I shut off, for example, ctrl-shft-escape ?

Is there a simple way to shut off all shortcuts for
all combos of ctrl, shft, escape, function keys etc etc ?

Thanks



 
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
Shorcuts or Macro for Creating If Else Statements excel wonk Excel Worksheet Functions 2 June 2nd 07 07:35 PM
Disabling the cut function? Tim G. Excel Discussion (Misc queries) 3 September 27th 06 05:01 PM
Disabling updatelinks Dave Excel Discussion (Misc queries) 0 April 27th 06 12:05 PM
Excel shorcuts m_john New Users to Excel 1 August 26th 05 02:55 PM
Shorcuts k f h Excel Discussion (Misc queries) 2 May 26th 05 05:42 PM


All times are GMT +1. The time now is 06:24 PM.

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

About Us

"It's about Microsoft Excel"