emorris1000
Registered User.
- Local time
- Yesterday, 16:47
- Joined
- Feb 22, 2011
- Messages
- 125
Howdy
I finally got tired of having 100 macros managing my different custom shortcut menus, and decided to figure out how to generate the shortcut menus programatically (because lets be honest, Macros are the devil.)
I found a good tutorial here that I suggest anyone trying to do this should read:
http://blogs.office.com/b/microsoft...t-menu-for-a-form-form-control-or-report.aspx
and was able to create some basic shortcut menus like the following:
Nice and simple, now I have a copy command. But the problem is that I also need some custom commands. Most (possibly all?) of these would be function calls.
Anyone know how to do this?
I finally got tired of having 100 macros managing my different custom shortcut menus, and decided to figure out how to generate the shortcut menus programatically (because lets be honest, Macros are the devil.)
I found a good tutorial here that I suggest anyone trying to do this should read:
http://blogs.office.com/b/microsoft...t-menu-for-a-form-form-control-or-report.aspx
and was able to create some basic shortcut menus like the following:
Code:
Sub CreateCopyShortcutMenu()
Dim cmbshortcutmenu As Office.CommandBar
Set cmbshortcutmenu = CommandBars.Add("CopyShortcutMenu", _
msoBarPopup, False, False)
'ID 19 adds copy command
cmbshortcutmenu.Controls.Add Type:=msoControlButton, Id:=19
End Sub
Nice and simple, now I have a copy command. But the problem is that I also need some custom commands. Most (possibly all?) of these would be function calls.
Anyone know how to do this?