by VisualScope (20 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 28th May 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Reads and Writes to Different Lines in a Text File so you can put all of your Data into one Text File and not need to create multiple Text
Dim x As String
Dim y As String
Private Sub Command1_Click()
Open "c:/text.txt" For Input As #1
Line Input #1, x
Line Input #1, y
Close #1
Text1.Text = x
Text2.Text = y
End Sub
Private Sub Form_Load()
Open "c:/text.txt" For Output As #1
Print #1, "your first line of text"
Print #1, "your second line of text"
Close #1
End Sub
No comments have been posted about Reads and Writes to Different Lines in a Text File so you can put all of your Data into one Text Fi. Why not be the first to post a comment about Reads and Writes to Different Lines in a Text File so you can put all of your Data into one Text Fi.