Application EnableEvents

B

B Lynn B

If I set EnableEvents to False while my code is running, and then
accidentally exit the code without setting back to True - does this property
get reset to True when Excel is closed? My testing seems to verify that it
does, but I'm at a point where I could use confirmation. Thanks!
 
J

JockW

Hi
Your code will be reset when the workbook is opened again.

You could add:

Sub reset()
Application.EnableEvents = True
End Sub


to tour worksheet code.
If your code is stopped for whatever reason, press <Alt> + <F8> and select
this sub to re-enable your code.
Saves shutting down and starting again.
hth.
Jock
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top