I need a code that:
Displays text in a label if item is in list box 1
Displays different text if item is in list box 2
And displays different text if item is in neither
Heres what i came up with, but the label only shows the text if item is in listbox 1:
Dim i As Integer = 0
Dim listsize As Integer = ListBox1.Items.Count
Dim listsize2 As Integer = ListBox2.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
Label1.Text = "$20"
End If
i += 1
Loop
thanks for the help!
Displays text in a label if item is in list box 1
Displays different text if item is in list box 2
And displays different text if item is in neither
Heres what i came up with, but the label only shows the text if item is in listbox 1:
Dim i As Integer = 0
Dim listsize As Integer = ListBox1.Items.Count
Dim listsize2 As Integer = ListBox2.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
Label1.Text = "$20"
End If
i += 1
Loop
thanks for the help!