Click to See Complete Forum and Search --> : How to read previous line?


alexK
November 18th, 1999, 10:12 AM
I am reading a text file using following code

Line input #1, strTextLine



Then I analyze the line content.
Sometime if the text file has errors i.e it missing some lines. I report the problem and
then comeback to the loop that reads the lines.
Unfortunetly I am one line off now. Is it possible
to go one line back?
I am using VB5.
thks!
Alex.

czimmerman
November 18th, 1999, 01:48 PM
There may be a better solution than this, but the first thing that comes to mind is to save each line into a string array, and then access the previous element.

Charles Zimmerman
http://www.freevbcode.com