I have taken data from a text file and placed it in a listbox but I can't compare the data in the listbox to a variable.
counter = 0
Open "C:\MyFiles\Visual Basic 6.0\Excel Storage\Username Storage.txt" For Input As #1
Do While Not EOF(1)
Input #1, AlreadyTaken
List1.AddItem AlreadyTaken '(Display the contents of the file in a listbox, textbox or whatever you prefer)
counter = counter + 1
Loop
Close #1
That puts the data into the listbox but when I try to compare the data with a variable I can't get it to work.
counter = 0
Open "C:\MyFiles\Visual Basic 6.0\Excel Storage\Username Storage.txt" For Input As #1
Do While Not EOF(1)
Input #1, AlreadyTaken
List1.AddItem AlreadyTaken '(Display the contents of the file in a listbox, textbox or whatever you prefer)
counter = counter + 1
Loop
Close #1
That puts the data into the listbox but when I try to compare the data with a variable I can't get it to work.