Hi,
I am trying to write a routine to be able to place a textbox on a multipager layout that is on a userform during program execution. I am able to place a textbox on the userform but not on the page of a userform. Below is a snippet of code i found on this forum but it only puts the text box on the form not the page sitting on the form. Thanks
Private Sub CommandButton1_Click()
Dim newtxtbox As MSforms.Control
Set newtxtbox = UserForm1.Controls.Add("Forms.Textbox.1")
With newtxtbox
.Name = "new box"
.Left = 10
.Top = 10
.Width = 50
.Height = 20
.Visible = True
End With
End sub
Any suggestions
Thanks
I am trying to write a routine to be able to place a textbox on a multipager layout that is on a userform during program execution. I am able to place a textbox on the userform but not on the page of a userform. Below is a snippet of code i found on this forum but it only puts the text box on the form not the page sitting on the form. Thanks
Private Sub CommandButton1_Click()
Dim newtxtbox As MSforms.Control
Set newtxtbox = UserForm1.Controls.Add("Forms.Textbox.1")
With newtxtbox
.Name = "new box"
.Left = 10
.Top = 10
.Width = 50
.Height = 20
.Visible = True
End With
End sub
Any suggestions
Thanks