im useing this code right now
If i.Contains("1") Then
MsgBox("2")
Else
End If
but what i want to do it have it check multiple text like this
If i.Contains("1") or ("2") or ("3")Then
MsgBox("H2")
Else
End If
but that doesnt work anyone want to help
Printable View
im useing this code right now
If i.Contains("1") Then
MsgBox("2")
Else
End If
but what i want to do it have it check multiple text like this
If i.Contains("1") or ("2") or ("3")Then
MsgBox("H2")
Else
End If
but that doesnt work anyone want to help
If i.Contains("1") or i.Contains("2") or i.Contains("3")Then
MsgBox("H2")
End If
I think this should work.
This is easier then writing out or statements for each one, and it can be as long as you want:
vb.net Code:
Dim chrContains() As Char = {"1"c, "2"c, "3"c} If i.IndexOfAny(chrContains) Then MessageBox.show("H2") End If
thanks guys they both worked