code execution has been interrupted

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Is there a way to avoid the user to stop the process of a macro.
The reason for this is very simple : in the macro the sheet is deprotected
at the beginning and reprotect at the end. Therefore to avoid the user to
find a unprotected sheet whenever he stops the macros, I would like to set
the unbreakable switch to on.

Many thanks for your valuable help.

François
 
Take a look at:

application.EnableCancelKey

in VBA's help.

Read the warning in there about a "runaway" loop.
 

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