Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default new custom menu

Hello,
In office 2003;
If I create a new toolbar. And I have a new menu item on this toolbar.
Can I programatically add or remove items on this menu item?
how can you do that?
thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default new custom menu

You can,


Code to add a new Menu Item

Sub MenuCreate()

Dim mnMenu As Object

Set mnMenu = CommandBars("Worksheet Menu
Bar").Controls.Add(Type:=msoControlPopup, befo=5, temporary:=True)

mnMenu.Caption = "Example"

With mnMenu
With .Controls
'the code below adds a button
With .Add(msoControlButton)
.Style = msoButtonIcon
.FaceId = 463
.Caption = "About"
.OnAction = "About"
End With
End With
End With

End Sub

Any problems then let me know

"greg" wrote in message
...
Hello,
In office 2003;
If I create a new toolbar. And I have a new menu item on this toolbar.
Can I programatically add or remove items on this menu item?
how can you do that?
thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default new custom menu

thanks

"DMc2007" wrote in message
...
You can,


Code to add a new Menu Item

Sub MenuCreate()

Dim mnMenu As Object

Set mnMenu = CommandBars("Worksheet Menu
Bar").Controls.Add(Type:=msoControlPopup, befo=5, temporary:=True)

mnMenu.Caption = "Example"

With mnMenu
With .Controls
'the code below adds a button
With .Add(msoControlButton)
.Style = msoButtonIcon
.FaceId = 463
.Caption = "About"
.OnAction = "About"
End With
End With
End With

End Sub

Any problems then let me know

"greg" wrote in message
...
Hello,
In office 2003;
If I create a new toolbar. And I have a new menu item on this toolbar.
Can I programatically add or remove items on this menu item?
how can you do that?
thanks



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
Custom Context menu (Right click menu) not working in sheet changeevent. Madiya Excel Programming 3 February 11th 08 01:24 PM
Displaying A custom menu as a popup menu diddy_david Excel Programming 5 September 22nd 07 04:40 AM
Adding Sub Menu Item to Current Custom Menu Renato Excel Programming 2 December 19th 05 12:48 AM
VBA - Disappearing custom menu and custom toolbar Peter[_50_] Excel Programming 2 December 2nd 04 06:09 PM
Custom Menu return to Excel Menu upon Closing VetcalcReport Excel Programming 2 August 2nd 04 02:59 PM


All times are GMT +1. The time now is 04:53 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"