option button in toolbar

Can somebody help me build an option button in a toolbar ? I mean a button with dropped down 2 possibilities needed to build a code.I can build a single button with the code shown below.i will be grateful if someone could help me built an option button with the same code.

Sub ToolbarCustomers()

Dim cbr As Object
Dim cbb As Object
' msoBarTop = 1
Set cbr = CommandBars.Add(Name:="MyToolbarCustomers", Position:=1, Temporary:=True)

1. msoControlButton = 1 First buton MyBack2
Set cbb = cbr.Controls.Add(Type:=1, Temporary:=True)
With cbb
'.Caption = "My Button"
' msoButtonCaption = 2
' .Style = 2
.FaceId = 41
.Width = 60
.FontWeight = 800

.OnAction = "MyBack2"
End With

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!