Disable Ctrl and/or Alt Key

D

Danny

Is there a a macro command to disable the Ctrl and or the
Alt key so the user can't override my macros with shortcut
keys? I tried the OnKey method but I have to write a macro
for every shortcut key.
 
A

arno

Hi Danny,
so the user can't override my macros with shortcut
keys? I tried the OnKey method but I have to write a macro
for every shortcut key.
use
Application.EnableCancelKey = xlDisabled
at the beginning of each makro, you do *not* have to set back to "xlenabled"
because this happens automatically when the code has finished.

regards

arno
 
D

Danny

Hi Arno,

Thanks for our tip. However, it didn't work. As I said,
I wrote some onkey macros to disable shortcut keys,
examples below:

Application.OnKey "%{F8}", ""
Application.OnKey "^c", ""
Application.OnKey "^x", ""

I have to write more macros for other shortcut keys. I
think I inserted your macro "Application.EnableCancelKey =
xlDisabled" in the wrong place.

Regards,
Danny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top