I have a text file of about 20 file names I generated from doing a shell dir command and placing the output in a text file.
I am reading the text file row by row and doing processing after each row read. It works fine for the first 6 rows or so, then on the next row read, it stops advancing to the next row.
My code is basically as follows in VBA
Dim objfso As Object
Dim dirlist_rcd As String
Dim txtstream As Object
Set objfso = CreateObject("Scripting.fileSystemObject")
Set txtstream = objfspenTextFile(filepath & "dirlist.txt")
Do While Not txtstream.AtEndOfStream
dirlist_rcd = txtstream.ReadLine
....
processing...
...
Loop
I am reading the text file row by row and doing processing after each row read. It works fine for the first 6 rows or so, then on the next row read, it stops advancing to the next row.
My code is basically as follows in VBA
Dim objfso As Object
Dim dirlist_rcd As String
Dim txtstream As Object
Set objfso = CreateObject("Scripting.fileSystemObject")
Set txtstream = objfspenTextFile(filepath & "dirlist.txt")
Do While Not txtstream.AtEndOfStream
dirlist_rcd = txtstream.ReadLine
....
processing...
...
Loop