Hello dilettante,
I am trying to use your code in one of my projects. I have a few large files (greater than 2.5GB) and using your class I was able to scan and copy lines from the file. I just used your sample project and slightly modified it. This works absolutely fine except one problem. How can I start reading lines from a specific line position? I have 500,000 lines in my text file and I am only interested in the lines between 290,000 and 340,000.
This code starts from line number 1 and takes almost 15 minutes to reach the lines that I require.... How can I force it to start reading lines at a specific position?
Code:
'Inside a loop or timer
With htfIn
Line = .ReadLine()
txtLog.SelText = Line
txtLog.SelText = vbNewLine
currentlineNumber = currentlineNumber + 1
labelReadProgress.Caption = "Reading: " & Format$(currentlineNumber, "#,##0")
'htfOut.WriteLine Line
DoEvents
End With