How can I create a new control (like a TextBox)
in the code???
Is it possible???
Help me please...
Isabelle
Printable View
How can I create a new control (like a TextBox)
in the code???
Is it possible???
Help me please...
Isabelle
If you have VB6, you can add control directly to the Controls Collection, eg.
private Sub Command1_Click()
Controls.Add "VB.Textbox", "Text1"
me!Text1.Move 0, 0
me!Text1.Text = Text1
me!Text1.Visible = true
End Sub
Otherwise, you could create a Control Array of Invisible Textboxes at DesignTime, (Create1 and Set the Index to Zero), then load the Textboxes as you need them, eg.
private Sub Command1_Click()
Load Text1(1)
Text1(1).Move 0, 0
Text1(1).Caption = Text1
Text1(1).Visible = true
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]
And for a Control Array???