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