Disabling Shortcut Keys...

charlie79

Board Regular
Joined
Feb 27, 2002
Messages
97
Does anyone have experience or know how to disable shortcut keys for an excel workbook. I would like to disable such keys as ctrl+s, ctrl+o, as well as alt+f8 (displays macros shortcut menu), and any other shortcut keys that intitalize shortcut menus.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Haven't done this myself, but I know people like Juan Pablo G. have suggested this in the past.

Using VBA you can use the "OnKey" command to disable certain key combos, exmaple taken from VBA help:

<pre>This example disables the SHIFT+CTRL+RIGHT ARROW key sequence.

Application.OnKey "+^{RIGHT}", ""</pre>

HTH
 
Upvote 0
Thanks a bunch Mark. I guess it's not hard to find, but of the top of your head, what's the equivalent to "ALT" in vb code?
 
Upvote 0
Thanks again Mark, and I'm sorry about this, but I've been looking and can't seem to find it. What would the "F#" keys be. "F18" for example?
 
Upvote 0
Hey, charlie I work at Domtar as well
I am in Cornwall Mill
Anyways
I got this from excel help. I hope this is what you need



Key Code
BACKSPACE {BACKSPACE} or {BS}
BREAK {BREAK}
CAPS LOCK {CAPSLOCK}
CLEAR {CLEAR}
DELETE or DEL {DELETE} or {DEL}
DOWN ARROW {DOWN}
END {END}
ENTER (numeric keypad) {ENTER}
ENTER ~ (tilde)
ESC {ESCAPE} or {ESC}
HELP {HELP}
HOME {HOME}
INS {INSERT}
LEFT ARROW {LEFT}
NUM LOCK {NUMLOCK}
PAGE DOWN {PGDN}
PAGE UP {PGUP}
RETURN {RETURN}
RIGHT ARROW {RIGHT}
SCROLL LOCK {SCROLLLOCK}
TAB {TAB}
UP ARROW {UP}
F1 through F15 {F1} through {F15}


You can also specify keys combined with SHIFT and/or CTRL and/or ALT. To specify a key combined with another key or keys, use the following table.

To combine keys with Precede the key code by
SHIFT + (plus sign)
CTRL ^ (caret)
ALT % (percent sign)
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,255
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top