Good morning.
I have this code that runs a macro when the value in a specific column changes. I'd like to add an If...Then so the macro does NOT run if <ADD NEW> is the value. Here's my code:
I have this code that runs a macro when the value in a specific column changes. I'd like to add an If...Then so the macro does NOT run if <ADD NEW> is the value. Here's my code:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub
On Error Resume Next
Set KeyCells = Range("CalendarModelColumn")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Application.EnableEvents = False
Call Model
Application.EnableEvents = True
End If
End Sub