Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question regarding OpenTextFile 1

Status
Not open for further replies.

dmkAlex

Programmer
Nov 25, 2005
66
US
The following example read the first line of the file, which contains multiple lines. How do I move to the next line?

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("C:\Endicia-output.prn", ForReading, TristateUseDefault)
x = f.ReadLine

Thanks.

Alex
 

You have moved to the next line with ReadLine. Successive calls to ReadLine will automatically move to the next line.

If you don't want the input from a line you can use the SkipLine method

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top