Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default msoButtonUp / Down for sub-menu items

Hi all

I have a problem with a toolbar Im developing. What I want to do is have a
tick button next to the sub-menu item (Show New Toolbar) using msoButtonUp /
Down. I can sort out the syntax to do this to the main menu item (Toolbar)
but am struggling to get it next to the sub-menu. This is a portion of the
code Im using :

Sub Menu()
Dim HelpMenu As CommandBarControl, NewMenu As CommandBarPopup
Dim MenuItem As CommandBarControl, Submenuitem As CommandBarButton
Set HelpMenu = CommandBars(1).FindControl(Id:=30010)
Set NewMenu = CommandBars(1).Controls.Add(Type:=msoControlPopup,
Befo=HelpMenu.Index, temporary:=True)
NewMenu.Caption = "My Toolbars"
Set MenuItem = NewMenu.Controls.Add(Type:=msoControlPopup)
With MenuItem
..Caption = "Toolbar"
..BeginGroup = True
End With
Set Submenuitem = MenuItem.Controls.Add(Type:=msoControlButton)
With Submenuitem
..Caption = "Show New Toolbar"
..OnAction = "Macro1"
End With
End Sub

Any ideas anyone?

Thanks

Dominic

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
Menu items Pietro Excel Discussion (Misc queries) 2 March 1st 07 10:41 AM
New menu items Daniel Bonallack Excel Programming 2 November 2nd 05 07:59 PM
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM
Toggle CommandBarControls msoButtonDown/msoButtonUp Paul Martin Excel Programming 1 October 15th 04 06:51 PM
Sub Menu Items pauluk[_72_] Excel Programming 1 July 27th 04 12:23 PM


All times are GMT +1. The time now is 07:37 AM.

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"