OptionButton is used to make one selection from multiple options. It is also referred to as a Radio Button, which chooses one option from a group of mutually exclusive options. If OptionButtons are not grouped, selecting one OptionButton in a UserForm will de-select all other OptionButtons in the form. All OptionsButtons within a specific Group become mutually exclusive and self-contained within that group and do not affect selection of OptionButtons outside that group. Selecting an OptionButton in one group will de-select all other OptionButtons of only that group.
OptionButtons can be grouped by the following methods: (i) using the GroupName property: OptionButtons can first be added to a UserForm and then their GroupName property can be set either in the Properties window or by using a macro or vba code. OptionButtons having the same GroupName become mutually exclusive and selecting one OptionButton will de-select all other OptionButtons of that group; and (ii) using a Frame Control: First add the Frame in a UserForm and then add OptionButtons to the Frame. A Frame can contain other Controls as well. Each Frame will separately group two or more OptionButtons, irrespective of whether all OptionButtons across other Frames, also have the same GroupName. However, it might be preferable to group OptionButtons using the GroupName property than using a Frame only for this purpose, to save space and reduce the UserForm size. Note: A MultiPage control is also a container and is used to group or organize related controls within each of its pages. Each page of a MultiPage control will separately group two or more OptionButtons, irrespective of whether all OptionButtons (across all pages) have the same GroupName.
The Value property of an OptionButton indicates whether it is selected or not. A True value indicates that the OptionButton is selected, False is the default value and indicates that it is not selected.