Excel VBA - How to Add TextBox to UserForm Programatically

preview_player
Показать описание
Excel VBA Learn how to add TextBox to UserForm programatically

The code used in this video:

Private Sub UserForm_Initialize()
Dim cTextBox As Control
Set cTextBox = Controls.Add("Forms.TextBox.1")
With cTextBox
.Height = 30
.Width = 200
.Top = 20
.Left = 20
End With
End Sub
Рекомендации по теме
Комментарии
Автор

good, thanks, congratulation from Ecuador, Quito

jorgetaco
Автор

This is extremely helpful. Clear, concise and to the point.

matt
Автор

Thanks for the great video !
after I've added the controls ass you explain, how do I pass the values in the controls into the worksheet ?

uniQue_XL
Автор

How can I create these Control Boxes in Userform with multiple pages?
Also how do create permanently (means, if I close the userform, control boxes stay with the userform next time I open?)

tymussh
Автор

How to include a combo box in excel userform of 60 records? Thanks for your advice in advance.

ksnarayanan