Hi, I am putting a text file in a listbox. But someone on here told me to restore the file. I dont know how to do this. Can someone help me. This is what I have:

Open "c:/student docs/payroll.txt" For Input As #1
Do
Line Input #1, strLine
intPos = InStrRev(strLine, Space(1))
lstEmployees.AddItem Left(strLine, intPos - 1)
intPos = InStr(1, Left(strLine, intPos - 1), Space(1))
txtFirstName.Text = UCase(Left(strLine, 1) & Mid(strLine, intPos + 1, 1))
txtLastName.Text = Mid(strLine, Pos + 1)
Loop Until EOF(1)
Close #1