Question:
How can I count the number of lines in a TXT file?
Solution:
To do so, you must use the methods in FileSystemObject object.
Example:
'Script for returning lines in a TXT file i = 0 Set fso = CreateObject("scripting.FileSystemObject") Set f = fso.OpenTextFile("C:\Test.txt",1) Do Until f.AtEndOfStream f.SkipLine i = i +1 Loop Msgbox "Number of lines: " & i