Here is my code:
If (txtOrderNo.Text.Chars(0) = "A" Or "B" Or "C" Or "X") And (txtOrderNo.Text.Chars(1) = "0" Or "1" Or "2" Or "3") Then
ListBox1.Items.Add(txtOrderNo.Text)
Else
MsgBox("error")
What I want to do is, the input that the user puts in, must be up to 7 chars long, but the first character must be A, B, C or X and the second character must be 0, 1, 2 or 3 then the rest are numeric.
Oh and, once the input is correct, it adds the order number into a list box.
Can anyone help?
Thanks!!!!
If (txtOrderNo.Text.Chars(0) = "A" Or "B" Or "C" Or "X") And (txtOrderNo.Text.Chars(1) = "0" Or "1" Or "2" Or "3") Then
ListBox1.Items.Add(txtOrderNo.Text)
Else
MsgBox("error")
What I want to do is, the input that the user puts in, must be up to 7 chars long, but the first character must be A, B, C or X and the second character must be 0, 1, 2 or 3 then the rest are numeric.
Oh and, once the input is correct, it adds the order number into a list box.
Can anyone help?
Thanks!!!!