Read previous line of textfile

  • Thread starter Thread starter Adrian
  • Start date Start date
A

Adrian

I have a text file that I want to read line by line, but
BACKWARDS !!

The ReadLine method reads the next line.
But I need to read the last line first, then the previous
line, working backwards to the beginning etc etc.
(Each line needs to be the right way round within itself.)
The text files are typically 50,000 lines long.

Any ideas?
 
Probably easiest to open it in Excel, then work from the last row to the
first.
 
Read the whole file into a variable and use split(strVar,vbvrlf) to
assign it to an array.

Then work from the upper to lower bound of the array.

Tim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top