Basic Concept
Dim dsh As Worksheet
Set dsh = Sheets("Dealer Boxes")
Dim m As Long
For m = 2 To dsh.Range("D100000").End(xlUp).Row
If Application.WorksheetFunction.CountIf(dsh.Range("D" & 2, "D" & m), Me.TextBox1.Value) Then
MsgBox "Already distributed, Please try another !"
Exit Sub
End If
No comments:
Post a Comment