B
Bob
access 2k;
I've tried EVERYTHING I can think of to create a custom drop down
menu. I have NO problem creating buttons on an existing menu pulldown.
I would like to add (next to the Help pulldown) a pulldown called
"Bob". As you can see there's 2 versions; but I've tried Dozens!!
here's the code I believe to be the closest I've come to getting it
working:
Dim cb As CommandBar, ctl As CommandBarControl
Set cb = CommandBars("Menu Bar")
' Set ctl = cb.Controls.Add("Bob", Type:=msoControlButton)
Set ctl = cb.Controls.Add(Type:=msoControlButton, Id:="Bob")
With ctl
.BeginGroup = False
.OnAction = "=msgbox('hi there')"
.Visible = True
End With
This will be a pulldown menu, with another button that will do the
OnAction.
tia - Bob
I've tried EVERYTHING I can think of to create a custom drop down
menu. I have NO problem creating buttons on an existing menu pulldown.
I would like to add (next to the Help pulldown) a pulldown called
"Bob". As you can see there's 2 versions; but I've tried Dozens!!
here's the code I believe to be the closest I've come to getting it
working:
Dim cb As CommandBar, ctl As CommandBarControl
Set cb = CommandBars("Menu Bar")
' Set ctl = cb.Controls.Add("Bob", Type:=msoControlButton)
Set ctl = cb.Controls.Add(Type:=msoControlButton, Id:="Bob")
With ctl
.BeginGroup = False
.OnAction = "=msgbox('hi there')"
.Visible = True
End With
This will be a pulldown menu, with another button that will do the
OnAction.
tia - Bob