Hi,
I am just trying to clean up a code to make it easier for me and I have moved the following code from the
to a module.
I have deleted the target column from the code but now I am getting the run time error 424 and it highlights this part:
I have looked online and tried different things but nothing has worked for me.
Any help would be appreciated.
Thanks
Dan
I am just trying to clean up a code to make it easier for me and I have moved the following code from the
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal target As Range)
Dim RowNumSC As Long
RowNumSC = ActiveCell.Row
'COLUMN 16 = P - SHUTTLE CAR
If target.Column = 16 And Range("N" & Selection.Row).Value = Range("N5").Value And _
WorksheetFunction.CountBlank(Range(cells(RowNumSC, 4), cells(RowNumSC, 13))) = 0 Then
MsgBox "1"
Call DisplayUserForm1_CIL(target)
ElseIf target.Column = 16 And Range("N" & Selection.Row).Value <> Range("N6" & Selection.Row).Value And _
Range("O" & Selection.Row).Value <> "" And WorksheetFunction.CountBlank(Range(cells(RowNumSC, 4), cells(RowNumSC, 13))) = 0 Then
MsgBox "2"
Call DisplayUserForm1_CIL(target)
ElseIf target.Column = 16 Then
MsgBox "3"
CIL_Check
End If
End Sub
I have deleted the target column from the code but now I am getting the run time error 424 and it highlights this part:
VBA Code:
Call DisplayUserForm1_CIL(target)
I have looked online and tried different things but nothing has worked for me.
Any help would be appreciated.
Thanks
Dan