The code for reading from a text file looks like this:
Sub readtxtfile()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim fs, f
Clear the sheet where results will be written. 65536 is the maximum line number before excel 2007.
Sheets("sheets 1").Rows("2:65536").DeleteSet fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("file.txt", ForReading, TristateFalse)
i = 2
While f.AtEndOfStream <> True
txt = Trim(f.readline)
Sheets("sheets 1").Cells(i, 1) = txt
i = i + 1
Wend
End Sub
Enjoy.