Disable a Macro

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a macro that runs automatically every time certain cells are changed
I also have an "update" macro which I run manually.
Is there code I can put into the "update" macro that disables the automatic
macro, allowing the "update" routine to run unimpeded, then insert another
line of code to re-enable the automatic macro?

Dave.
 
application.EnableEvents = false

then at the end of your code:
application.EnableEvents = true

You might also need to use
application.calculation = xlmanual

followed by (at the end of the code)
application.calculation = xlautomatic
 
Thanks Darren - Worked a treat. I was searching the HELP for "disable"
Dave.
 

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

Back
Top