View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Run VBA code only worksheet change, but don't triggerworksheet_change event based on what the code does

application.enableevents = false
'your code that would have triggered any event
application.enableevents = true



ker_01 wrote:

I have two cells with data validation (each using a named range/list that
brings in data from another sheet).

When one changes, it runs through my code and works just fine.

When the other data validation changes, one of the things I have to do is
re-set the other data validation cell to the default value. This part is
working fine, except that it triggers the worksheet_change event to run a
second time.

Is there an elegant way to catch/ignore the worksheet_change event when
changes are caused by code instead of user interaction?

Thanks,
Keith


--

Dave Peterson