lior03
11-13-2007, 02:49 AM
hello all
during the course of my excel development hobby i inventerd a lot of menu
shortcuts.i want to orgnize all of them under one shortcutmenu(suppose to be first item in my shortcut menu).by clicking this menu a list with all my shortcuts will appear.
On Error Resume Next
Dim MenuItem
CommandBars("Cell").Controls("iris").Delete
Dim NewItem As CommandBarControl
Set NewItem = CommandBars("Cell").Controls.Add(Type:=msoControlPopup)
Set Submenuitem = MenuItem.Controls.Add _
(Type:=msoControlButton)
With Submenuitem
.Caption = "add a new worksheet"
.FaceId = 420
.OnAction = "addworksheet5"
.BeginGroup = True
End With
i know it's possible i saw some excel add-in having the same feature.
thanks
during the course of my excel development hobby i inventerd a lot of menu
shortcuts.i want to orgnize all of them under one shortcutmenu(suppose to be first item in my shortcut menu).by clicking this menu a list with all my shortcuts will appear.
On Error Resume Next
Dim MenuItem
CommandBars("Cell").Controls("iris").Delete
Dim NewItem As CommandBarControl
Set NewItem = CommandBars("Cell").Controls.Add(Type:=msoControlPopup)
Set Submenuitem = MenuItem.Controls.Add _
(Type:=msoControlButton)
With Submenuitem
.Caption = "add a new worksheet"
.FaceId = 420
.OnAction = "addworksheet5"
.BeginGroup = True
End With
i know it's possible i saw some excel add-in having the same feature.
thanks