Hello, I am using FSO to count lines of text in a file. The issue I am having is that I cant seem to figure out how to move the pointer back to the first line once I'm AtEndOfStream. This is what I have so far:
Any Ideas? Or maybe FSO is not the best way to tackle this, and I am certainly open to using another method.
Code:
With New Scripting.FileSystemObject
With .OpenTextFile(sFilename, ForReading)
Do Until .AtEndOfStream
.SkipLine
LineCount = LineCount + 1
Loop
'Move pointer back to first line and do more stuff
Any Ideas? Or maybe FSO is not the best way to tackle this, and I am certainly open to using another method.