when I enter TEXT in sub-serial, MUST BE CHECK FIRST IF THE TEXT IS ALREADY IN LISTBOX.ITEMS
how do I check the listbox.item = subserial.text?
CodePudding user response:
You can use FindStringExact
bool contains = listbox.FindStringExact(subserial.Text) != -1;
CodePudding user response:
For Each a As String In String.Join(vbCrLf, ListBox1.Items.Cast(Of String))
If txtSS.Text = a Then
MsgBox("It's already barcoded!")
txtSS.Text = ""
End If
Next
I GOT IT!