This property returns and sets a value that indicates the display type and behavior of the control.
object.Style
Following are the settings for the Style property for the Checkbox, CommandButton, CommandBarButton, and OptionButton controls:
Following are the settings for the Style property for the ComboBox control:
Following is the setting for the Style property for the ListBox control:
The following table shows the settings for the Style property for the CommandBarButton object.
Constant |
Value |
Description |
| cbrAutoSize | 5 | Sizes the button based on the Caption property |
| cbrButtonGroup | 2 | Begins or ends a button group |
| cbrCheck | 1 | Toggles between a pressed and an un-pressed state, depending on the Value property |
| cbrDefault | 0 | Behaves as a standard CommandButton |
| cbrSeparator | 3 | Provides space between buttons and separates button groups |
The following table shows the settings for the Style property for the CommandBarComboBox object.
Constant |
Value |
Description |
| cbrComboDropDown | 2 | Drop-down box with a textbox |
| cbrComboDropDownList | 3 | Drop-down box only |
The following table lists the settings for the Style property for the Item object of a CommandBar control.
Constant |
Value |
Description |
| cbrMenuDefault | 0 | Menu caption is displayed |
| cbrMenuSeparator | 1 | Item is a menu separator |
The Style property is read-only at run time, except for the CommandBarButton, CommandBarComboBox, and CommandBarMenuBar.
For the ComboBox control, follow these guidelines to decide which setting to choose: