Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
msoControlButton to "Worksheet Menu Bar" ?
Hi All,
I find it easy to add an msoControlPopup menu item to "Worksheet Menu Bar" Is it possible to add msoControlButton to "Worksheet Menu Bar" ? when I tried to get it does,nt work !? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
msoControlButton to "Worksheet Menu Bar" ?
Hi Soniya
Do you want this Sub MenuBar_Item() MenuBar_Item_Delete With Application.CommandBars(1) With .Controls.Add(Type:=msoControlButton, befo=1) .Style = msoButtonCaption .Caption = "&Hi" .OnAction = ThisWorkbook.Name & "!TestMacro" End With End With End Sub Sub MenuBar_Item_Delete() On Error Resume Next Application.CommandBars(1).Controls("Hi").Delete On Error GoTo 0 End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Soniya" wrote in message ups.com... Hi All, I find it easy to add an msoControlPopup menu item to "Worksheet Menu Bar" Is it possible to add msoControlButton to "Worksheet Menu Bar" ? when I tried to get it does,nt work !? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
msoControlButton to "Worksheet Menu Bar" ?
Soniya,
This worked for me With Application.CommandBars("Worksheet Menu Bar") With .Controls.Add(Type:=msoControlButton, temporary:=True) .Caption = "Test" .Style = msoButtonCaption .OnAction = "myMacro" End With End With Note setting the style, this is critical if you want to see the text <G -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "Soniya" wrote in message ups.com... Hi All, I find it easy to add an msoControlPopup menu item to "Worksheet Menu Bar" Is it possible to add msoControlButton to "Worksheet Menu Bar" ? when I tried to get it does,nt work !? Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
msoControlButton to "Worksheet Menu Bar" ?
thanks for your help.
Now it works ! i was missing the .style part |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F | Excel Discussion (Misc queries) | |||
Stop users from accessing "Protection" option from "Tools" menu | Excel Programming | |||
CommandBars("Worksheet Menu Bar").Controls("Tools").Enabled = Fals | Excel Programming | |||
save and restore "Workbook Menu Bar" & "Cell" menus | Excel Programming | |||
Make "Worksheet Menu Bar" invisible or Delete/hide it's buttons | Excel Programming |