PDA

View Full Version : Disable Fn Alt and Ctrl Keys



chem101
02-17-2011, 10:02 AM
Hello Everyone,

I would like to further limit the UI on my workbook by disabling all the Function keys, the Alt key and the Ctrl key. Can this be done in VBA so that these limitations are for this workbook only? I've been using this code to disable the F11 key:

Application.OnKey "%{F11}", " "

I've been trying to use an If, Then statement on a Worksheet Module page to set up a 'backdoor'. Something like:

If wksThisForm.Range("a1")="backdoor" Then
Application.Onkey"%{F11}",

End If

End Sub


Is this the best way to do this?
Thank you for any help you can provide.!!

GTO
02-17-2011, 10:28 AM
If you are wanting to disable the shortcut keys, have fun. There's like 3 bajillion of them, and only some are listed in help.

I'm out for now, but will try and check tomorrow. Someplace I made a list that could be cycled thru.

Mark