Hi currently I have this code
But there is a error at the "if c in thisworkbook" statement. I want MsgBox to pop out when my the 5 digit number in textbox1 match with the same number in column D with a "/" or "," with it
VBA Code:
Private Sub TextBox1_Change()
Dim c As Range
If Len(TextBox1.Value) >= 5 Then
If c in ThisWorkbook.ActiveSheet.Range("D1", .Cells(.rows.Count, "D").End(x1Up)) Then
If InStr(c, "/") > 0 Or InStr(c, ",") > 0 Then
If MsgBox("Please confirm cell " & c.Address, vbYesNo, "Double Check") = vbNo Then Exit Sub
End If
End If
End If
End Sub