Option button in toolbar

peljo

Registered User.
Local time
Yesterday, 16:36
Joined
May 24, 2006
Messages
24
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
 

Users who are viewing this thread

Back
Top Bottom