Run VBA code only worksheet change, but don't triggerworksheet_change event based on what the code does
Hi Keith
Turn off events handling before your macro change the cells.
Application.EnableEvents= False
Just remeber to turn it on again =True
Regards,
Per
On 3 Okt., 22:19, "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
|