DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Method: SkipLine for TextStream

Method: SkipLine for TextStream

Skips a line when reading a TextStream file.

Object.SkipLine
ObjectTextStream
Object with this method

The following example opens a text file into which it writes two text lines. Then the example opens the file for reading, skips the first line, and returns the second line:

Function SkipOneLine(sFile)
  Const ForReading = 1, ForWriting = 2
  Dim fso, oMyFile
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set oMyFile= fso.OpenTextFile(sFile, ForWriting, True)
  oMyFile.Write "First Line" & vbCrLf & "Second Line"
  Set oMyFile = fso.OpenTextFile(sFile, ForReading)
  oMyFile.SkipLine
  SkipOneLine = oMyFile.ReadLine
End Function

See Also

Objects Overview

In This Section
Was this information helpful?