Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding an Object to a MultiPage
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding an Object to a MultiPage
Set NewOptBtn = _
MyForm.Designer.Controls("MultiPage1").Pages(0).Ad d("forms.OptionButton.1") Assuming "Page1" is the first page its index is 0 Regards, Peter T "Brandt" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding an Object to a MultiPage
Thank You Peter
"Peter T" wrote: Set NewOptBtn = _ MyForm.Designer.Controls("MultiPage1").Pages(0).Ad d("forms.OptionButton.1") Assuming "Page1" is the first page its index is 0 Regards, Peter T "Brandt" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change from page1 to page2 of MultiPage object | Excel Programming | |||
Adding frame on multipage through code... | Excel Programming | |||
Creating an Object on a Multipage | Excel Programming | |||
Check for any data changes in a form with multipage object | Excel Programming | |||
Multipage Object on User Form | Excel Programming |