Disabling Alt+F11

R

richard_b2004

Salut! Is there any way I can prevent the user stopping my macros b
pressing Alt+F11 and breaking the routine?

Thank
 
D

Dave Peterson

Are you asking how you can keep those users out of your code?

If yes, inside the VBE, you can lock the project.
Tools|VBAProject Properties|Protection tab.
Give it a memorable password and lock the project for viewing.

If you're asking how to stop the users from interrupting your running code, take
a look at VBA's help for:

Application.EnableCancelKey
 
D

Dave Peterson

I should have added that protecting the VBA project will keep most out, it won't
stop the determined. There are commericial password breakers (pretty cheap) and
other free versions.
 
T

TJ Walls

Hi Richard,

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

Also, you will need to reset it when you are done!

Application.OnKey "%{F11}"

-TJ
 
Top