View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Protect macro from stopping

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.

In article <76cb3d4443159@uwe,
"saman110 via OfficeKB.com" <u35670@uwe wrote:

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.