how to import different lines of text from a text file in the same directory to different textboxes Please Help!
e.g. line one in text file to textbox1.text ect.
Printable View
how to import different lines of text from a text file in the same directory to different textboxes Please Help!
e.g. line one in text file to textbox1.text ect.
Code:Dim l() As String = IO.File.ReadAllLines("the text file")
For i As Integer = 0 To l.Length - 1
Me.Controls("TextBox" & (i + 1).ToString()).Text = l(i)
Next