I am trying to create a Loop that will read through the information on my ListView through the SubItem to find the text that matches the text in my Textbox whenever I hit the search button and Focuses the listbox onto the matched text. Below is what I have but it keeps telling me that the value of string cannot be converted. I am also pretty sure that my numbers wont loop correctly but I am not really sure how to cause them to loop endlessly till end of statement.
Dim T As String T = Lines.Text For r As Integer = 0 to -1 For C As Integer = 0 to -1 If List.Items(r).SubItems(C).Text = Lines.Text Then List.FocusedItem = T End If Next NextEnd Sub