Hello Group,
I have created a custom shortcut menu (right-click) for my users; code below:
Dim cmb As Office.CommandBar
Set cmb = Application.CommandBars.Add("myShortcut", msoBarPopup, , True)
With cmb
.Controls.Add msoControlButton, 210, , , True 'sort asc
.Controls.Add msoControlButton, 211, , , True 'sort desc
.Controls.Add(msoControlButton, 21, , , True).begingroup = True 'cut
.Controls.Add msoControlButton, 19, , , True 'copy
.Controls.Add msoControlButton, 22, , , True 'paste
.Controls.Add(msoControlButton, 644, , , True).begingroup = True 'delete record
.Controls.Add(msoControlButton, 1576, , , True).begingroup = True 'insert hyperlink
End With
The code creates a custom shortcut menu visible when my users right-click on an enabled form.
It works well in Access 2003...but when i run the same mdb in 2010, the hyperlink option on the menu is disabled/greyed out.
I'm guessing that i'm using the wrong number (1576) for 2010, but I'm not sure.
I created a test accdb in 2010 just to see what the shortcut menu option was...
On a hyperlink field (is hyperlink = true in form properties) the shortcut menu displays: 'Hyperlink'
and then provides several options: Edit Hyperlink; Open Hyperlink; ... Remove Hperlink.
Does anyone know what msoControlButton number corresponds with 'Hyperlink' so i can display it on my shortcut menu?
I actually ran a function that created a custom ribbon displaying about 2000 shortcut icons with their applicable numbers...
I couldn't find 'Hyperlink' and i'm guesing it's because it doesn't have an icon...
Thanks,
alex