PDA

Click to See Complete Forum and Search --> : how to create textboxes at run time?


schuurke28
Jul 10th, 2003, 08:51 AM
i'm using the createObject function but it doesn't work


Set oTextBox = CreateObject("MSForms.textBox")


what am i doing wrong?

WorkHorse
Jul 10th, 2003, 06:52 PM
To create an object you would have to pass the programmatic identifier like this:

Set oTextBox = CreateObject("Forms.TextBox.1")Use the same syntax to add a control to a UserForm at run-time.

Me.Controls.Add "Forms.TextBox.1", "MyBoxName", True:)

schuurke28
Jul 11th, 2003, 01:43 AM
Great, thx a lot!