Table of contents
TOC
Collapse the table of content
Expand the table of content

GroupName Property Example

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

The following example uses the GroupName property to create two groups of OptionButton controls on the same form.

To use this example, copy this sample code to the Declarations portion of a form. Make sure that the form contains five OptionButton controls named OptionButton1 through OptionButton5.

Private Sub UserForm_Initialize() 
 OptionButton1.GroupName = "Widgets" 
 OptionButton2.GroupName = "Widgets" 
 OptionButton4.GroupName = "Widgets" 

 OptionButton3.GroupName = "Gadgets-Group2" 
 OptionButton5.GroupName = "Gadgets-Group2" 
End Sub
© 2018 Microsoft