sanilmathews
Board Regular
- Joined
- Jun 28, 2011
- Messages
- 102
Hello,
I am looking to modify the below code in a way that when the user selects "Yes" in the drop down in cell A1, macro should just Exit sub. And when user selects "No" in the drop down the code should trigger "MyMacro".
I am looking to modify the below code in a way that when the user selects "Yes" in the drop down in cell A1, macro should just Exit sub. And when user selects "No" in the drop down the code should trigger "MyMacro".
Code:
Private Sub Worksheet_Change (ByVal Target As Range)
If Intersect (Target, Me.Range("A1")) Is Nothing Then Exit Sub
Application.EnableEvents = False
On Error GoTo ErrorHandler
Call MyMacro
ErrorHandler:
Application.EnableEvents = True