Pressing Esc Terminates the Macro


Posted by Shamsuddeen. P.K on January 09, 2002 10:04 AM


Pressing Esc Key terminates the macro. How to avoid this.

Regards,

Shamsuddeen



Posted by Jacob on January 09, 2002 11:21 AM

Hi

Application.enablecancelkey = xldisabled

This will stop esc and ctrl + alt + break from stopping the macro. Be carefull tho because there is no way to stop runaway code so put this line in when you are certain your code works fine.

HTH

Jacob