Style Property
Style property as it applies to the CommandBarButton object.
MsoButtonStyle
MsoButtonStyle can be one of these MsoButtonStyle constants. |
msoButtonAutomatic |
msoButtonCaption |
msoButtonIcon |
msoButtonIconAndCaption |
msoButtonIconAndCaptionBelow |
msoButtonIconAndWrapCaption |
msoButtonIconAndWrapCaptionBelow |
msoButtonWrapCaption |
Style property as it applies to the CommandBarComboBox object.
MsoComboStyle
MsoComboStyle can be one of these MsoComboStyle constants. |
msoComboLabel |
msoComboNormal |
Example
This example creates a shortcut menu containing a button control and a combo box control and sets the style of each.
Set myBar = CommandBars _
.Add(Name:="Custom1", Position:=msoBarPopup, Temporary:=False)
With myBar
.Controls.Add Type:=msoControlButton, Id:=3
.Controls(1).Style = msoButtonCaption
.Controls.Add Type:=msoControlComboBox
With .Controls(2)
.Style = msoComboLabel
.AddItem "vanilla"
.AddItem "chocolate"
.AddItem "cookie dough"
End With
End With
myBar.ShowPopup
Applies to | CommandBarButton Object | CommandBarComboBox Object