View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Christian Treffler Christian Treffler is offline
external usenet poster
 
Posts: 12
Default Excel2000: Avoiding loop in Worksheet_Change event

Gary''s Student schrieb:

Application.EnableEvents=False
do your logic
Application.EnableEvents=True


You might also want to include some error handling. Here's a good
introduction on how to do this:
http://www.cpearson.com/excel/ErrorHandling.htm

The reason: If an error occurs in your logic, the events stay disabled.
Your code for Worksheet_change will not run anymore.

Happened to me all the time recently while developing a small Excel
application.

CU,
Christian