G
Guest
I can add an optionbutton to a UserForm via the code below. What I am trying
to do, however, is to add the option button to "Page1" of "MultiPage1" of
"UserForm1". I can't seem to get this to work. Any Ideas?
Thanks
Sub AddOptionButton()
Dim MyForm
Dim NewOptBtn As Msforms.OptionButton
Set MyForm = ThisWorkbook.VBProject.VBComponents("UserForm1")
Set NewOptBtn = MyForm.Designer.Controls.Add("forms.OptionButton.1")
End Sub
to do, however, is to add the option button to "Page1" of "MultiPage1" of
"UserForm1". I can't seem to get this to work. Any Ideas?
Thanks
Sub AddOptionButton()
Dim MyForm
Dim NewOptBtn As Msforms.OptionButton
Set MyForm = ThisWorkbook.VBProject.VBComponents("UserForm1")
Set NewOptBtn = MyForm.Designer.Controls.Add("forms.OptionButton.1")
End Sub