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
 
Back
Top