This isnt for a company called Display Pack is it?
Well if it is ill still help you out.
Dim sr As New System.IO.StreamReader("C:\Text.txt")
Dim line As String
Dim x As Integer
Do Until sr.Peek = -1
x += 1
line = sr.ReadLine
If x = 3 Then this will return the 3rd element
TextBox1.Text = line This will input everything from line 3 into a textbox
Exit Do
End If
Loop
dont forget to close the stream reader object when your done with it.
sr.close() this closes it
Or you could make line an array and store all lines in there then just query your array with the correspondiing line number
No, Im making a server file serving program for users and I need to check in a text file for what files they can download and their username/password information. =D
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.