Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sub-menus of main menus for Excel 2007 Eleanor Peppard New Users to Excel 1 March 16th 10 04:12 PM
Creating Drop-down menus with subset drop-down menus Benjamin Excel Worksheet Functions 4 June 8th 09 11:27 PM
difference between word 2003 menus and word 2007 menus-Explain pl kali Excel Discussion (Misc queries) 1 August 29th 07 07:56 AM
New Menus - attaching but menus are reset Greegan Excel Worksheet Functions 0 November 5th 05 03:19 PM
Overriding Actions of Excel DropDown Menus and Poup Menus Von Shean Excel Programming 2 February 3rd 04 06:43 AM


All times are GMT +1. The time now is 02:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"