You have your closing parenthesis in the wrong place causing the first
IF
to be always true.
I also added a line of code to remove spaces from front and back of
ziptextbox.Text
in case user accidentally types spaces before or after the zip code.
Furthermore, the
Label.Show
method is for internal use only, You do not need it and should not use it in your code. See the documentation for
Label.Show[
^]
Corrected version
ziptextbox.Text = ziptextbox.Text.Trim
If shippingonelistbox.FindString(ziptextbox.Text) >= 0 Then
shippinglabel.Text = "Shipping is $15"
ElseIf shippingtwolistbox.FindString(ziptextbox.Text) >= 0 Then
shippinglabel.Text = "Shipping is $20"
Else
shippinglabel.Text = "The zipcode was not found!"
End If
Tested: Visual Studio 2012