Maybe this code helps you.
Code:Dim oneLine As String 'one line of the file 'open the file Open "c:\myfile.txt" For Input As #1 'read each line and add it to the textbox Do 'read a line Line Input #1,oneLine 'add it to the textbox Text1.Text = Text1.Text & oneLine & VBCRLF Loop Until Eof(1) 'close the file Close #1





Reply With Quote