Suspending MAcros

K

Kaval

I am using a Worksheet_Change macro to update several
cells when a change is made in a specific range.

When the macro changes the other cells it then starts the
Worksheet_Change routine again and I end up with an
endless loop.

Is there an easy way to temporarily suspend the
Worksheet_Change macro while cells are updated and then
re-enable?

Kaval
 
T

Tom Ogilvy

Application.EnableEvents = False
' code that causes change to fire again
Application.EnableEvents = True
End sub
 

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