ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Protect macro from stopping (https://www.excelbanter.com/excel-discussion-misc-queries/154376-protect-macro-stopping.html)

saman110 via OfficeKB.com

Protect macro from stopping
 
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.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200708/1


JE McGimpsey

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.



All times are GMT +1. The time now is 04:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com