Method: Skip for TextStream
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Methods > Method: Skip for TextStream
Method: Skip for TextStream
Skips one or more characters when reading a TextStream file.
Object.Skip(Characters)
| Object | TextStream Object with this method |
| Characters | LongInteger Specifies the number of characters that DIAdem skips. |
The following example opens a text file into which it writes a text line. Then the example opens the file for reading, skips the first ten characters, and returns the remainder of the text:
Function SkipCharacters(sFile) Const ForReading = 1, ForWriting = 2 Dim fso, oMyFile Set fso = CreateObject("Scripting.FileSystemObject") Set oMyFile= fso.OpenTextFile(sFile, ForWriting, True) oMyFile.Write "This is a text" Set oMyFile = fso.OpenTextFile(sFile, ForReading) oMyFile.Skip(10) SkipCharacters = oMyFile.ReadLine End Function