Ok.. Here is my problem.. I have a blank form and I need to add 700 Richtextboxes.. This will act like a table.. It will be 7 Columns with 100 Rows.. Right Now, I know how to make 700 Richtextboxes.. I am using Dim TC as New Richtextbox
DIm I as Integer
For I = 1 to 100
TC.Size = XX,XX
TC.Location = 6, 12 + (I * 12)
Next I

That is not exactly it, but It is something close to that.. I CAN create the Richtextboxes but then I run in to problems.. I DONT KNOW THE NAME OF THE BOXES.. So there is no way that I can give values to any of the information in the Richtextboxes.. I even tried to make all the Richtextboxes by hand but VB.net couldnt handle it and it froze up.. I even tried to put TC.text = TC.Name and all the boxes came up blankkk.. Any Ideas??

7 Years
Discussion Span
Last Post by Teme64

Set Name-property:

Dim TC As RichTextBox
For I = 1 To 100
  TC = New RichTextBox
  TC.Name = "RTBox" & I.ToString
Next I

now you should have rt-boxes with names "RTBox1", "RTBox2", ..., "RTBox100".
You'll refer to rt-boxes: Me.Controls.Item("RTBox1") or cast control to RichTextBox type. For example CType(Me.Controls.Item("RTBox1"), RichTextBox).Multiline = True set's the Multiline property of the rt-box.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.