I am trying to make the worksheet change, to look at 2 different cells and if they become YES or NO, call a macro.
I am new to worksheet change events, so im not sure how to do this. I can get 1 change to work...i cant get 2 target addresses to work.
Can anyone help?
Its important that the worksheet change event only occurs when G19 or G127 change.
I am new to worksheet change events, so im not sure how to do this. I can get 1 change to work...i cant get 2 target addresses to work.
Can anyone help?
Its important that the worksheet change event only occurs when G19 or G127 change.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address(0, 0) = "G19" Then
If Target.Value = "Yes" Then
Call NoClaimBonus
ElseIf Target.Value = "No" Then
Worksheets("TD Payment Calculator").Unprotect
Call NoNoClaimBonus
End If
If Target.Count > 1 Then Exit Sub
If Target.Address(0, 0) = "G127" Then
If Target.Value = "Yes" Then
Call NoClaimBonus
ElseIf Target.Value = "No" Then
Worksheets("TD Payment Calculator").Unprotect
Call NoNoClaimBonus
End If
Application.EnableEvents = True
End If
End Sub