![]() |
How auto EnableEvents again on code-break and errors?
When one hits "End" on a error in the code after a EnableEvents=false,
the complete programming has been finised! So how can a automaticly re-enable the events? I tryed using a sub with EnableEvents=True that get's executed with a OnTime-event after the code has been finished, but this gives "Can't execute code in break mode" while I'm debugging and programming. Also if I go in break-mode while debugging, the last line that re-enables the events isn't getting executed. This way I need to enable the events manually before I can start debugging it again. |
How auto EnableEvents again on code-break and errors?
Michel
I don't think you can do it automatically. If I'm going to do it a lot, I set up a sub like you and just run it after I exit debug mode. Otherwise, I just use the Immediate Window. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Michel" wrote in message om... When one hits "End" on a error in the code after a EnableEvents=false, the complete programming has been finised! So how can a automaticly re-enable the events? I tryed using a sub with EnableEvents=True that get's executed with a OnTime-event after the code has been finished, but this gives "Can't execute code in break mode" while I'm debugging and programming. Also if I go in break-mode while debugging, the last line that re-enables the events isn't getting executed. This way I need to enable the events manually before I can start debugging it again. |
All times are GMT +1. The time now is 09:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com