Replace END with Exit Sub. The END command stops all VBA code.
Private Sub Worksheet_Change(ByVal target As Range)
LR = Range("A65536").End(xlUp).Row
If Not Intersect(target, Range("W2:AR" & LR)) Is Nothing _
Or Not Intersect(target, Range("W2:W" & LR)) Is Nothing _
Or Not Intersect(target, Range("X2:X" & LR)) Is Nothing Then
If Not Intersect(target, Range("A2:T" & LR)) Is Nothing Then
Exit Sub
End If
'''Or Not Intersect(target, Range("X2:X" & LR)) Is Nothing _
frmManualEntry.Show
TargetRow = target.Row
Range("AU" & TargetRow).FormulaR1C1 = "@ " & Format(Now(), "hh:mm") & " by " & Environ("USERNAME")
With Range("AS" & TargetRow)
.Select
.FormatConditions.Add Type:=xlExpression, Formula1:="=LEN(TRIM(AU" & TargetRow & "))=0"
' .FormatConditions(Range("AU" & TargetRow).FormatConditions.Count).SetFirstPriority
With .FormatConditions(1)
With .Interior
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
End With
.StopIfTrue = True
End With
End With
MsgBox "Please enter the reason why the device was not used"
End If
End Sub
Bookmarks