I would like to know how to load several lines of data from a file, to a form.
Printable View
I would like to know how to load several lines of data from a file, to a form.
saving and loading text from/into textbox's sample
VB Code:
Private Sub Command1_Click() 'Save the text Open "C:\TEST.TXT" For Output As #1 Write #1, Text1.Text Close #1 End Sub Private Sub Command2_Click() 'Load the text Open "C:\TEST.TXT" For Input As #1 Text1.Text = Input(LOF(1), 1) Close #1 End Sub
if that is not what u want, u have to elaborate a bit :)
Beaten to it by 7mins..... dam proxy caching pages, don't i look the gormless d!@$ :D
From a text file it's...........
This reads the text file one line at a time and prints it to the form.Code:
Dim strX As String
Dim intX As Integer
intX = FreeFile
Open "PATH" For Input As #intX
Do Until EOF(intX)
Input #intX, strX
Print strX
Loop
Close #intX