by Vineeth Venugopal (7 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 9th September 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)
writes the first line of a text file to the list box in form
Dim objFSO As FileSystemObject
Dim objTXT As TextStream
Dim str$
Set objFSO = New FileSystemObject
If objFSO.FileExists("c:\rem.txt") Then
objTXT = objFSO.OpenTextFile("c:\rem.txt", ForReading)
End If
str = objTXT.ReadLine
End Sub