"Target" is a variable for worksheet event, not for Module procedures.
If anything, it should be:
For worksheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 11 Then
Call CAP_PD_DEPOSIT_TRANSFER(Target) 'Passing a "Target" object to the "CAP_PD_DEPOSIT_TRANSFER" procedure
End If
End Sub
For "Module1" module:
Sub CAP_PD_DEPOSIT_TRANSFER(rngTarget As Range) '"rngTarget" to not confuse with "Target"
'Wherever "Target" occurs, replace it with "rngTarget", i.e.:
If Target.Value = "RLCMO" Or Target.Value = "RPCMO" Then
'to
If rngTarget.Value = "RLCMO" Or rngTarget.Value = "RPCMO" Then
'but
If Target.Cells.Count > 1 Then Exit Sub 'remove it from here
If Target.Column = 11 Then 'remove it from here
'keep commands inside
End If 'remove it from here
'Correct the constructions "If ... Then ... End If" i.e. uncomment 'End If
End Sub
Bookmarks