Hi!
How can you go back a line, when you are reading a textfile. I know there is a function to skip the line, but I haven't found a way to go back the line.
I need that because when script looks for certain expression in the text file and finds that expression, I need to record that line. But what happens is that when it finds the expression it goes on the next line.
Here's an example of the code
Thank you!
How can you go back a line, when you are reading a textfile. I know there is a function to skip the line, but I haven't found a way to go back the line.
I need that because when script looks for certain expression in the text file and finds that expression, I need to record that line. But what happens is that when it finds the expression it goes on the next line.
Here's an example of the code
Code:
Do Until objFileforReading.AtEndOfStream
strLine = objFileforReading.Readline
strFind = "expression"
If InStr(1,strLine,strFind, VBTEXTCOMPARE)>0
strLine = objFileforReading.Readline
MsgBox strLine
End If
Loop
Thank you!