this might also help you to read all the lines in a textfile
Dim oRead As System.IO.StreamReader
Dim FirstLine(1499) As String
oRead = IO.File.OpenText(Application.StartupPath & "\test.txt")
Dim lineNo As Integer = 0
While Not oRead.EndOfStream
FirstLine(lineNo) = oRead.ReadLine
lineNo += 1
End While