Login Register






VB - Import Text From .txt file? -- Help! filter_list
Author
Message
RE: VB - Import Text From .txt file? -- Help! #2
You would never assign to:
Code:
TextBox.Text

So is this all the same TextBox or a bunch of different TextBoxes?

If it's all the same use File.ReadAllText() to copy the string over to the control. If it is different TextBoxes, I would index from File.ReadAllLines().

Might look something like this...
Code:
Dim lines As String() = File.ReadAllLines("FILEPATH") For i As Integer = 0 To lines.Length - 1 Me.Controls("TextBox" + i.ToString()).Text = lines(i) Next
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply





Messages In This Thread