Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Awesome, thanks to all that responded- This looks like it will solve my
problem. Best, Keith "Rick Rothstein" wrote in message ... You would use the EnableEvents property of the Application object. Here is one of the many way to structure it... Private Sub Worksheet_Change(ByVal Target As Range) If <Your_Test_Condition = True Then On Error GoTo CleanUp Application.EnableEvents = False ' ' <<Your code goes here ' End If CleanUp Application.EnableEvents = True End Sub Note: The On Error trap is needed in case your code errors out... if you don't turn the EnableEvents back on, it remains off for other macros that may be executed afterwards. -- Rick (MVP - Excel) "ker_01" wrote in message ... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trigger Event Code | Excel Programming | |||
Code to trigger drop down-select event | Excel Programming | |||
Code WAY too slow... (worksheet_change event) | Excel Programming |