As you can see at the above picture, im trying to make a program in which if the textbox text and the listbox text are the same order, which they are in the picture, a bluie fonted text saying well done appears. However only the red text appears which is only meant to come when the order of the text in both listbox and textbox isnt the same.
Here is the code that i used for this:
listarrays = name of listbox
textbox1 = name of textbox
l is the name of the label for correct answer(blue font)
label3 is name of label with red font which should only appear for wrong answer
Some people told me to use another textbox instead of the listbox but thats just making itmuch harder for me as I already made the full code working with the listbox. My lecturer told me i need to convert both in string so both textbox and listbox are compatible and i did so (see code above) but the correct label doesnt show;pCode:Dim text As String = Me.TextBox1.Text For Each item As Object In listarrays.Items If item.ToString = Me.TextBox1.Text Then l.Visible = True Else Label3.Visible = True End If Next
Any help would be appreciated





Reply With Quote