I need a code that using a do while loop will display a message if:
the text is in list box 1
the text is in list box 2
or the text is in neither list boxes
this is the code i came up with, but it only works if te\he item is in list box 1:
Dim i As Integer = 0
Dim listsize As Integer = FifteenListBox.Items.Count
Dim listsize2 As Integer = TwentyListBox.Items.Count
Dim zipcode As Integer= ZipTextBox.Text
Do While (i < listsize - 1)
Do While (i < listsize - 1)
If (ListBox1.Items(i) = zipcode) Then
Label1.Text = "$15"
End If
i += 1
Loop
Loop
Do While (i < listsize2 - 1)
If (ListBox2.Items(i) = zipcode) Then
Label2.Text = "$20"
End If
i += 1
Loop
the text is in list box 1
the text is in list box 2
or the text is in neither list boxes
this is the code i came up with, but it only works if te\he item is in list box 1:
Dim i As Integer = 0
Dim listsize As Integer = FifteenListBox.Items.Count
Dim listsize2 As Integer = TwentyListBox.Items.Count
Dim zipcode As Integer= ZipTextBox.Text
Do While (i < listsize - 1)
Do While (i < listsize - 1)
If (ListBox1.Items(i) = zipcode) Then
Label1.Text = "$15"
End If
i += 1
Loop
Loop
Do While (i < listsize2 - 1)
If (ListBox2.Items(i) = zipcode) Then
Label2.Text = "$20"
End If
i += 1
Loop