Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bon Bon is offline
external usenet poster
 
Posts: 23
Default How to disable CTRL key

Dear all

I am wondering how to disable the Ctrl key. Thus, user can't use
CTRL+P, CTRL+O,.. etc to trigger build in functions?

Thanks
Bon

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default How to disable CTRL key

Hi, Bon,

You don't disable the Ctrl key as such, rather the things that you'd want to
do with it. here's some code i run when one of my workbooks is opened.

'Application.OnKey "^{n}", "" 'disable creation of new workbook
'Application.OnKey "%{F11}", "" 'disable [Shift]+F11 to view code
'Application.OnKey "%{F8}", "" 'disable [Shift]+F8 to run macros

the ^ character represents [Control] - hence ^{n} is the same a Control+N
The % represents [Alt]
You use + to repesent [Shift]

When you close the workbook, you can run

Application.OnKey "^{n}"
Application.OnKey "%{F11}"
Application.OnKey "%{F8}"

to reset the key combinations to their original dunctions.

Check out the Help on ONKEY

Hope this helps

Regards

Pete




"Bon" wrote:

Dear all

I am wondering how to disable the Ctrl key. Thus, user can't use
CTRL+P, CTRL+O,.. etc to trigger build in functions?

Thanks
Bon


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
disable CTRL-pageup & pagedown Boss Excel Discussion (Misc queries) 4 January 8th 08 06:08 PM
Disable CTRL+D??? CMIConnie Excel Discussion (Misc queries) 0 February 9th 06 07:52 PM
How to disable Ctrl+Break No Name Excel Programming 1 April 23rd 04 02:17 PM
How to disable the Ctrl+Break ? Krzysztof Klimczak Excel Programming 1 July 31st 03 02:21 PM
disable ctrl+s susie Excel Programming 1 July 24th 03 08:02 PM


All times are GMT +1. The time now is 12:03 AM.

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

About Us

"It's about Microsoft Excel"