Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disabling Key stroke Short-cuts


Hi!
How can I prevent a user from useing key srtoke short-cuts such as
Ctrl+page to navigate to next sheet? I want to elliminate all key
stroke short-cuts in this workbook. Is this possible? If so How do I
re-enable them so I can work on the book?
Thanks for your help!!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=484297

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Disabling Key stroke Short-cuts

Hi Brian

You can use Onkey (see VBA Help)

Try this two macro's

Sub UIT()
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
Application.OnKey "{PGDN}", ""
Application.OnKey "{PGUP}", ""
End Sub


Sub AAN()
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
Application.OnKey "{PGDN}"
Application.OnKey "{PGUP}"
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Brian Matlack" wrote in message
news:Brian.Matlack.1yc9wm_1131723604.0603@excelfor um-nospam.com...

Hi!
How can I prevent a user from useing key srtoke short-cuts such as
Ctrl+page to navigate to next sheet? I want to elliminate all key
stroke short-cuts in this workbook. Is this possible? If so How do I
re-enable them so I can work on the book?
Thanks for your help!!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=484297



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Disabling Key stroke Short-cuts

There is no way to disable all keyboard short cuts. You would
have to disable each one individually with the OnKey method. That
said, however, why would you want to disable navigation
shortcuts? Your users will hate you for it. I wouldn't use any
Excel product that disabled keyboard shortcuts.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Brian Matlack"

wrote in message
news:Brian.Matlack.1yc9wm_1131723604.0603@excelfor um-nospam.com...

Hi!
How can I prevent a user from useing key srtoke short-cuts such
as
Ctrl+page to navigate to next sheet? I want to elliminate all
key
stroke short-cuts in this workbook. Is this possible? If so How
do I
re-enable them so I can work on the book?
Thanks for your help!!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile:
http://www.excelforum.com/member.php...fo&userid=3508
View this thread:
http://www.excelforum.com/showthread...hreadid=484297



Reply
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
Short-cuts Horacio[_3_] Excel Discussion (Misc queries) 1 April 24th 09 05:11 PM
cant open short cuts chrisbmo2000 Excel Discussion (Misc queries) 1 May 21st 08 06:54 PM
short cut stroke to move between work sheets in Excel Randall Excel Worksheet Functions 2 February 13th 07 03:59 AM
Short cuts? Bob Phillips Excel Discussion (Misc queries) 4 March 31st 05 06:27 PM
need short cuts in the find option Trisher75 Excel Discussion (Misc queries) 5 March 3rd 05 10:07 PM


All times are GMT +1. The time now is 05:40 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"