Protect macro from stopping

  • Thread starter Thread starter saman110 via OfficeKB.com
  • Start date Start date
S

saman110 via OfficeKB.com

How can I prevent users to stop the macro from running. If macro is doing its
thing and you press ESC button it will stop and I don't want that to happen.
Is there any way?

thx.
 
Look at the EnableCancelKey property in VBA Help.

Make sure you provide an error handler - clients/users tend to get
perturbed if you leave them in an endless loop.

They also tend to abort applications that *appear* to be hung, so you
might instead consider a custom error handler that handles the ESC key
rather than just disabling it.
 
Back
Top