stopping a change event

  • Thread starter Thread starter Cathy
  • Start date Start date
C

Cathy

I have an event that fires off when a change occurrs in
the worksheet. The event changes values and colors of
cells. Each time the event changes something, it also
calls itself which results in an endless loop. Does
anyone know how I can stop the event from calling
itself?

Thanks
Cahty
 
Hi Cathy
At the beginning:
Application.enableevents = false

and at the end of your macro:
Application.enableevents = True

Note: Don't gorget to re-enable the events
 
Sub YourMacro()
Application.EnableEvents = False
///rest of your code here///
Application.EnableEvents = True
End Sub

HTH
Jason
Atlanta, GA
 
Thank you!!!! This is exactly what I needed. I couldn't
find it in the help files.
 

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