Property: AtEndOfLine for TextStream
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: AtEndOfLine for TextStream
Property: AtEndOfLine for TextStream
Checks whether the read pointer is just before the end of line of a TextStream file.
Object.AtEndOfLine
| Object | TextStream Object with this property |
| Object.AtEndOfLine | Boolean value with read access The value is True if the read pointer is before the end of line character, otherwise the value is False. |
The following example returns the last character of the first line of a file:
Function ReadEndOfLine(sFile) Const ForReading = 1 Dim fso, oMyFile, sOutput Set fso = CreateObject("Scripting.FileSystemObject") Set oMyFile = fso.OpenTextFile(sFile, ForReading, False) Do While oMyFile.AtEndOfLine <> True sOutput = oMyFile.Read(1) Loop oMyFile.Close ReadEndOfLine = sOutput End Function