Disabling Alt+F11

  • Thread starter Thread starter richard_b2004
  • Start date Start date
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
 
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
 
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.
 
Hi Richard,

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

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

Application.OnKey "%{F11}"

-TJ
 

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

Back
Top