I'm looking for code by check duplicate item in one of the textbox. I'm trying below code but its doesn't work.
Code
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1.BackColor = vbWhite
If Application.WorksheetFunction.CountIf(Worksheets("Sheet2").Range("A6:A1048559"), TextBox1.Text) > 0 Then
MsgBox "Duplicate QR Code"
Cancel = True
End If
End Sub
Display More
YF