E
Ed
I want to add a dozen (and perhaps 100) text boxes to a form dynamically.
The 'standard' code is:
Set oTextBox = Me.Controls.Add _
("Forms.TextBox.1", "txtLine" & CurrentCount)
However, as I add each control, I then need to change its attributes (width,
height, font, text alignment) etc. to the configuration I need. With 100 new
text boxes, that could take some time, even on a fast computer. (I know I
need to change "top" and "left", but I was hoping not to have to change
anything else.)
I presume that "Forms.TextBox.1" has the 'default attributes' already built
in.
Can I create a new "Forms.TextBox.1" (maybe a "Forms.TextBox.2") in VBA with
my own attributes?
-Ed (in Virginia)
The 'standard' code is:
Set oTextBox = Me.Controls.Add _
("Forms.TextBox.1", "txtLine" & CurrentCount)
However, as I add each control, I then need to change its attributes (width,
height, font, text alignment) etc. to the configuration I need. With 100 new
text boxes, that could take some time, even on a fast computer. (I know I
need to change "top" and "left", but I was hoping not to have to change
anything else.)
I presume that "Forms.TextBox.1" has the 'default attributes' already built
in.
Can I create a new "Forms.TextBox.1" (maybe a "Forms.TextBox.2") in VBA with
my own attributes?
-Ed (in Virginia)