I have an Excel 2010 spreadsheet, and I am reading in information from a .txt file (and another .xls file in future).
This text file has 3 elements per row; firtname
Sub FetchDataFromTextFile()
Dim i As Long
Dim LineText As String
Open "C:\mytxtfile.txt" For Input As #24
i = 2
While Not EOF(24)
Line Input #24, LineText
Dim arr
arr = Split(CStr(LineText), ", ")
For j = 1 To
ActiveSheet.Cells(i, j).Value = arr(j - 1)
Next j
i = i + 1
Wend
Close #24
End Sub
For different delimiters, make use of the answers in here