Solved -- in 2.5 hours! Worked the first time. Thank you pjwhitfield!
(and thank you gmr4evr1 and jindon for giving it a shot, and thank you again patel45 for the kickstart)
For anyone else who comes across this thread in the future, here is pjwhitfield's tested and functional update to patel45's code for Importing Multiple Multi-line text files, each in a new column:
Sub readTxtFiles()
Dim folderPath As String, Filename As String, WB As Workbook
folderPath = "C:\test\" ' <<<< folder of text files (to be changed)
Filename = Dir(folderPath & "*.txt")
dcol = 1 ' <<< initial destination column
Do While Filename <> ""
drow = 2 ' <<< initial destination row
sn = Split(CreateObject("scripting.filesystemobject").opentextfile(folderPath & Filename).readall, vbCrLf)
For j = 0 To UBound(sn)
Cells(j + drow, dcol) = sn(j)
Next
drow = drow + j
Filename = Dir
dcol = dcol + 1
Loop
End Sub
Bookmarks