ButtonCount Property

Example   Applies To   See Also

Specifies the number of buttons in a CommandGroup or OptionGroup. Available at design time and run time.

Syntax

Control.ButtonCount[ = nNumber]

Settings

nNumber

Specifies the number of buttons for the control.

Remarks

Use the ButtonCount property to dynamically set the number of buttons contained in a CommandGroup or OptionGroup.

If you change the number of buttons at run time, names are automatically assigned to the new buttons. The buttons are assigned the name CommandN for a CommandGroup or OptionN for an OptionGroup where N is the number of the button added. For example, if there are four buttons in the CommandGroup and the Buttons property setting is changed to 5, the new button is named Command5.