Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Menus with sub menus...
Hi.
I'm trying to add a sub menu to a custom menu item, like on the Data menu where the Filter item has three subs... Auto-Filter, Show All, and Advanced Filter I can add the Menu, and the first menu item, but haven't found where to then add a list of things to the item created. What is that next step? Thanks, Mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Menus with sub menus...
You need something like this:
Set SubMenuItem = MenuItem.Controls.Add(Type:=msoControlButton) With SubMenuItem .Caption = "&Obtain Oracle Data" .FaceId = 2109 .OnAction = "FullProcess" End With -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "mark" wrote: Hi. I'm trying to add a sub menu to a custom menu item, like on the Data menu where the Filter item has three subs... Auto-Filter, Show All, and Advanced Filter I can add the Menu, and the first menu item, but haven't found where to then add a list of things to the item created. What is that next step? Thanks, Mark |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Menus with sub menus...
what I actuall needed was something like this:
'***************** Sub sbAddKensReport() 'dimension variables Dim cmdBar As CommandBar Dim myCommand As CommandBarControl Dim mySubCommand As CommandBarControl 'assign variables Set cmdBar = CommandBars("Tools") Set myCommand = cmdBar.Controls.Add(Type:=msoControlPopup) Set mySubCommand = myCommand.Controls.Add 'assign captions myCommand.Caption = "Ken's Report" mySubCommand.Caption = "Run" 'assign program to run With mySubCommand .OnAction = ThisWorkbook.Name & "!" & "sbKen" End With End Sub '********************* That adds the menu type I was asking about, which is actually called a popup, not a drop-down. "Michael" wrote: You need something like this: Set SubMenuItem = MenuItem.Controls.Add(Type:=msoControlButton) With SubMenuItem .Caption = "&Obtain Oracle Data" .FaceId = 2109 .OnAction = "FullProcess" End With -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "mark" wrote: Hi. I'm trying to add a sub menu to a custom menu item, like on the Data menu where the Filter item has three subs... Auto-Filter, Show All, and Advanced Filter I can add the Menu, and the first menu item, but haven't found where to then add a list of things to the item created. What is that next step? Thanks, Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sub-menus of main menus for Excel 2007 | New Users to Excel | |||
Creating Drop-down menus with subset drop-down menus | Excel Worksheet Functions | |||
difference between word 2003 menus and word 2007 menus-Explain pl | Excel Discussion (Misc queries) | |||
New Menus - attaching but menus are reset | Excel Worksheet Functions | |||
Overriding Actions of Excel DropDown Menus and Poup Menus | Excel Programming |