Please help,
I have a list of names in the range B3:b22 on worksheet 1...
Using VBA, I can build a custom commandbar/toolbar but I cannot get my head around adding a menu control to the commandbar, and then adding a series of individual (control) buttons to that drop-down menu control.
(Each button will be assigned to a name in the list on the worksheet... I think I can work that bit...but it's getting the menu control added onto the commandbar, and then adding control buttons to that menu control that I'm having problems with)
Thank you.
edit: this is what I am building the commandbar with:
I'd like to add the Menu Control as the third item
Thanks again
I have a list of names in the range B3:b22 on worksheet 1...
Dave R
Dave P
Katrina
Anne Marie
Alex W
Lynne
Errol
Charles
Jim
Mike
Martin
Bill
Ann
Keith
Neil
Alex D
Marina
Kathy
Mark
Bob
Stephan
Paul
Using VBA, I can build a custom commandbar/toolbar but I cannot get my head around adding a menu control to the commandbar, and then adding a series of individual (control) buttons to that drop-down menu control.
(Each button will be assigned to a name in the list on the worksheet... I think I can work that bit...but it's getting the menu control added onto the commandbar, and then adding control buttons to that menu control that I'm having problems with)
Thank you.
edit: this is what I am building the commandbar with:
Code:
Private Sub CBTR() 'all User & Authoriser level 2
On Error Resume Next
'if commandbar already exists, delete it
Application.CommandBars("CBTR").Delete
On Error GoTo errhandler
'
'build new commandbar
Set CB = Application.CommandBars.Add("CBTR")
With CB
.Protection = msoBarNoMove + msoBarNoCustomize
.Position = msoBarTop
.Enabled = True
.Visible = True
End With
'
'build commandbar controls
Set CBC = CB.Controls.Add(Type:=msoControlButton, ID:=2950, before:=1)
With CBC
.Caption = "CBTR:"
.TooltipText = "© 2005"
.Enabled = False
.Style = msoButtonCaption
End With
'
Set CBC = CB.Controls.Add(Type:=msoControlButton, ID:=2950, before:=2)
With CBC
.Caption = "Sign In / Sign Out"
.TooltipText = "Change User"
.Enabled = True
.Style = msoButtonCaption
.BeginGroup = False
.OnAction = "Log_User"
End With
I'd like to add the Menu Control as the third item
Thanks again