I can't figure out what I haven't defined properly.
The line:
If Not (Intersect(Target, Range("H" & rowNum))) Is Nothing Then
Gives the error.
The line:
If Not (Intersect(Target, Range("H" & rowNum))) Is Nothing Then
Gives the error.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rowNum As Integer
Dim cellResult As Variant
rowNum = ActiveCell.Row - 1
Dim fromSales As Boolean
fromSales = Range("A" & rowNum).Value
'On Change Cutting delivery date
If Not (Intersect(Target, Range("H" & rowNum))) Is Nothing Then
'If Target.Address = Range("H:H") Then
Call UpdateDeliveryWeek(rowNum)
If (fromSales = False) And (Range("B" & rowNum) = "") Or (Range("C" & rowNum) = "") Or (Range("D" & rowNum) = "") Or (Range("H" & rowNum) = "") Then
Exit Sub
Else
Call UpdateAllDatesFromStart(rowNum)
End If
End If