ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Submenus on Shortcut Menus (https://www.excelbanter.com/excel-programming/407096-submenus-shortcut-menus.html)

ZipCurs

Submenus on Shortcut Menus
 
I have a number of custom popup/shortcut menus I have created using the basic
format of:

With Application.CommandBars("cell").Controls _
.Add(Type:=msoControlButton, befo=1, temporary:=True)
.Caption = "Records"
.OnAction = "GoToRecords"
End With

For clarity sake and incase I am using the wroing terms, a short menu for me
is a temporary menu that appears near a cell when you right click it. I am
now interested in adding submenus to some of the popup menus buttons. I am
assuming that these would appear when you click the menu item. How do I go
about doing this? Thank you in advance for your assistance.

Jim Rech[_2_]

Submenus on Shortcut Menus
 
With CommandBars("Cell").Controls.Add(msoControlPopup, , , , True)
.Caption = "New Sub Menu"
With .Controls.Add(msoControlButton)
.Caption = "New Sub menu menuitem"
.....
End With
End With


--
Jim
"ZipCurs" wrote in message
...
|I have a number of custom popup/shortcut menus I have created using the
basic
| format of:
|
| With Application.CommandBars("cell").Controls _
| .Add(Type:=msoControlButton, befo=1, temporary:=True)
| .Caption = "Records"
| .OnAction = "GoToRecords"
| End With
|
| For clarity sake and incase I am using the wroing terms, a short menu for
me
| is a temporary menu that appears near a cell when you right click it. I
am
| now interested in adding submenus to some of the popup menus buttons. I
am
| assuming that these would appear when you click the menu item. How do I
go
| about doing this? Thank you in advance for your assistance.



ZipCurs

Submenus on Shortcut Menus
 
Jim,

Simple and exactly what I needed. Thank you.

"Jim Rech" wrote:

With CommandBars("Cell").Controls.Add(msoControlPopup, , , , True)
.Caption = "New Sub Menu"
With .Controls.Add(msoControlButton)
.Caption = "New Sub menu menuitem"
.....
End With
End With


--
Jim
"ZipCurs" wrote in message
...
|I have a number of custom popup/shortcut menus I have created using the
basic
| format of:
|
| With Application.CommandBars("cell").Controls _
| .Add(Type:=msoControlButton, befo=1, temporary:=True)
| .Caption = "Records"
| .OnAction = "GoToRecords"
| End With
|
| For clarity sake and incase I am using the wroing terms, a short menu for
me
| is a temporary menu that appears near a cell when you right click it. I
am
| now interested in adding submenus to some of the popup menus buttons. I
am
| assuming that these would appear when you click the menu item. How do I
go
| about doing this? Thank you in advance for your assistance.





All times are GMT +1. The time now is 09:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com