ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Simple Command Button (https://www.excelbanter.com/excel-programming/428314-simple-command-button.html)

ZipCurs

Simple Command Button
 
I am working in Excel 2007 and want to create a simple custom menu button in
the command bar. The button is currently under "Add Ins" on the control bar
and is with other buttons that do have submenus. I don't want any other
controls below it and would prefer not to have the little triangle next to
it. The code below
works fine expect for the negative aesthetics of the arrow next to it and
the empty pull down menu which shows up below it when it put the cursor over
the
button. Replacing msoControlPopup with mso ControlButton results in nothing
showing!

Set cmd = CommandBars("Worksheet Menu
Bar").Controls.Add(Type:=msoControlPopup, befo=13)
With cmd
.Caption = "About"
.Visible = True
.OnAction = "ShowAboutInfo"
End With

Any help would be greatly appreciated.



All times are GMT +1. The time now is 03:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com