Microsoft® Visual Basic® Scripting Edition
SkipLine Method
 Scripting Run-Time Reference 
Version 2 

See Also                   Applies to


Description
Skips the next line when reading a TextStream file.
Syntax
object.SkipLine

The object is always the name of a TextStream object.

Remarks
Skipping a line means reading and discarding all characters in a line up to and including the next newline character. An error occurs if the file is not open for reading.

The following example illustrates use of the SkipLine method:

Function SkipLineInFile
  Const ForReading = 1, ForWriting = 2
  Dim fso, f
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set f = fso.OpenTextFile("c:\testfile.txt", ForWriting, True)
  f.Write "Hello world!" & vbCrLf & "VB Script is fun!"
  Set f = fso.OpenTextFile("c:\testfile.txt", ForReading)
  f.SkipLine
  SkipLineInFile = f.ReadLine
End Function