hey guys i have been troubled by this for quite some time now. i have this example code in the command button.
Dim ctr As Integer, ctr2 As String
ctr2 = lst1.ListCount
x = Val(txt1.Text)
For ctr = 0 To ctr2
If x = Val(lst1.List(ctr)) Then
MsgBox "Error Duplicate"
Else
Msgbox "Good"
End If
Next ctr
where i have these values stored in the listbox
12.2.23.32
34.78.88.99
12.2.45.67
67.77.89.00
i have a textbox where if it has the same value like for example 12.2.45.67 it will produce error duplicate as seen in my code else it will produce the message box "Good". but everytime i enter a text for example 12.2.89.88 it produces the msgbox "error duplicate" where the result should be "Good" can someone help me out thanks.