Excel VBA - submenu in a short cut

B

bforster1

I have the following code that creates a dropdown menu when I righ
click in the spreadsheet

Sub CreateShortcut()
Dim myBar As CommandBar
Dim myItem As CommandBarControl

DeleteShortcut
Set myBar = CommandBars.Add _
(Name:="MyShortcut", Position:=msoBarPopup, Temporary:=True)

Set myItem = myBar.Controls.Add(Type:=msoControlButton)
With myItem
.Caption = "&Go To.."
.OnAction = "ShowFormatNumber"
.FaceId = 1554
End With


What I want to do is create a sub menu attached to the menus tha
originally display. See example below

Level 1 Go To
Leve 2 Budget

Any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top