I've got a list box populated from an array with membership numbers and a name in the list box.
I want to create a function to search the array and return a boolean value of true of false.
The boolean value is membershipno
The Listbox is populated like so;
Dim Myfile(99) As String Dim Count As Integer = 0 'declare stream reader object connected to the fiel Dim objReader As New System.IO.StreamReader("myfile.txt") 'initailise array counter Do While objReader.Peek <> -1 Myfile(Count) = objReader.ReadLine lstData.Items.Add(Myfile(Count)) Count += 1 Loop
Can I use InStr to search the file, and if so, how do I do it? Is there another function like Binary Search which is easier?