VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



writes the first line of a text file to the list box in form

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

Rate 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


Download this snippet    Add to My Saved Code

writes the first line of a text file to the list box in form Comments

No comments have been posted about writes the first line of a text file to the list box in form. Why not be the first to post a comment about writes the first line of a text file to the list box in form.

Post your comment

Subject:
Message:
0/1000 characters