Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shortcut menus in 2007
Using Office 2007 and Win XP;
In XL 2007 shortcut menus (right click menus) is it possible to have a "Title" row that does nothing when clicked but can be used to group the custom commands? For example (hopefully this will show up correctly in the news reader), Formats <<<title/group Number Text Imports <<<title/group G/L Payroll If this is possible, what is the command to create a "Title" or "Group Name" line? Thanks much in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shortcut menus in 2007
Something like this maybe
Sub AddToCellDropDown() Dim CellDropDown As CommandBar Dim MyDropDownItem As CommandBarControl Call RemoveFromCellDropDown Set CellDropDown = Application.CommandBars("Cell") With CellDropDown.Controls.Add(Type:=msoControlPopup, befo=1) .Caption = "My menu" .Tag = "MyDropDownItem" With .Controls.Add(Type:=msoControlButton) .Caption = "Copy to new worksheet" .OnAction = "Copy_Worksheet" End With With .Controls.Add(Type:=msoControlButton) .Caption = "Copy to new workbook" .OnAction = "Copy_Workbook" End With End With End Sub Sub RemoveFromCellDropDown() Dim MyDropDownItem As CommandBarControl Set MyDropDownItem = Application.CommandBars.FindControl(Tag:="MyDropDo wnItem") If Not MyDropDownItem Is Nothing Then MyDropDownItem.Delete End If Set MyDropDownItem = Nothing End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "XP" wrote in message ... Using Office 2007 and Win XP; In XL 2007 shortcut menus (right click menus) is it possible to have a "Title" row that does nothing when clicked but can be used to group the custom commands? For example (hopefully this will show up correctly in the news reader), Formats <<<title/group Number Text Imports <<<title/group G/L Payroll If this is possible, what is the command to create a "Title" or "Group Name" line? Thanks much in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shortcut menus in 2007
Hi Ron, Yeah; okay. I had not thought of using a menu control; that works! Thanks! "Ron de Bruin" wrote: Something like this maybe Sub AddToCellDropDown() Dim CellDropDown As CommandBar Dim MyDropDownItem As CommandBarControl Call RemoveFromCellDropDown Set CellDropDown = Application.CommandBars("Cell") With CellDropDown.Controls.Add(Type:=msoControlPopup, befo=1) .Caption = "My menu" .Tag = "MyDropDownItem" With .Controls.Add(Type:=msoControlButton) .Caption = "Copy to new worksheet" .OnAction = "Copy_Worksheet" End With With .Controls.Add(Type:=msoControlButton) .Caption = "Copy to new workbook" .OnAction = "Copy_Workbook" End With End With End Sub Sub RemoveFromCellDropDown() Dim MyDropDownItem As CommandBarControl Set MyDropDownItem = Application.CommandBars.FindControl(Tag:="MyDropDo wnItem") If Not MyDropDownItem Is Nothing Then MyDropDownItem.Delete End If Set MyDropDownItem = Nothing End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "XP" wrote in message ... Using Office 2007 and Win XP; In XL 2007 shortcut menus (right click menus) is it possible to have a "Title" row that does nothing when clicked but can be used to group the custom commands? For example (hopefully this will show up correctly in the news reader), Formats <<<title/group Number Text Imports <<<title/group G/L Payroll If this is possible, what is the command to create a "Title" or "Group Name" line? Thanks much in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sub-menus of main menus for Excel 2007 | New Users to Excel | |||
Disable all shortcut menus in Office 2007? | Excel Programming | |||
Submenus on Shortcut Menus | Excel Programming | |||
Disable Shortcut Menus / Alt-F8 | Excel Programming |