G
Guest
Hi all
I have the following code to create a new toolbar and add a button
Sub StaffSalariedbar(
Dim NewBtn As CommandBarContro
Dim StaffSalariedTBar As CommandBa
On Error Resume Nex
CommandBars("Salaries Toolbar").Delet
On Error GoTo
Set StaffSalariedTBar = CommandBars.Ad
With StaffSalariedTBa
.Name = "Salaries Toolbar
.Left = 105
.Top = 15
.Visible = Tru
End Wit
Set NewBtn = CommandBars("Salaries Toolbar").Controls.Add
(Type:=msoControlButton
With NewBt
.BeginGroup = Tru
.Style = msoButtonIconAndCaptio
.FaceId = 65
.OnAction = "ShowMenu
.Caption = "Main Menu
End Wit
End Su
How do I make the button the begining of a group (i.e it has that little drop down box where you can select more buttons) and then add buttons to that group.
Thanks for any hel
I have the following code to create a new toolbar and add a button
Sub StaffSalariedbar(
Dim NewBtn As CommandBarContro
Dim StaffSalariedTBar As CommandBa
On Error Resume Nex
CommandBars("Salaries Toolbar").Delet
On Error GoTo
Set StaffSalariedTBar = CommandBars.Ad
With StaffSalariedTBa
.Name = "Salaries Toolbar
.Left = 105
.Top = 15
.Visible = Tru
End Wit
Set NewBtn = CommandBars("Salaries Toolbar").Controls.Add
(Type:=msoControlButton
With NewBt
.BeginGroup = Tru
.Style = msoButtonIconAndCaptio
.FaceId = 65
.OnAction = "ShowMenu
.Caption = "Main Menu
End Wit
End Su
How do I make the button the begining of a group (i.e it has that little drop down box where you can select more buttons) and then add buttons to that group.
Thanks for any hel