Creating a Custom Menu

mbrinser

Registered User.
Local time
Today, 08:17
Joined
Nov 5, 2009
Messages
15
I have been trying to create a custom right-click menu and have posted the code below. I set the shortcut menu bar to SimpleShortcutMenu, yet my report tells me it does not recognize the module.


Sub CreateSimpleShortcutMenu()
Dim cmbShortcutMenu As Office.CommandBar

Set cmbShortcutMenu = CommandBars.Add("SimpleShortcutMenu", _
msoBarPopup, False, False)

cmbShortcutMenu.Controls.Add Type:=msoControlButton, Id:=605
cmbShortcutMenu.Controls.Add Type:=msoControlButton, Id:=640
cmbShortcutMenu.Controls.Add Type:=msoControlButton, Id:=109

Set cmbShortcutMenu = Nothing
End Sub
 
I believe you're referring to a Pop Menu Bar. Is there any reason why you don't want to create it from the toolbar?
 
brinser,

a right click menu for forms? what control buttons are you putting on? what are the IDs? wouldn't a menu bar at the top of your application be a better choice than a right click menu?
 

Users who are viewing this thread

Back
Top Bottom