Customise shortcut menu

M

Murthy

Hi,

I would like to add some of the commands that are available in the Excel
main menus to the shortcut menu that one gets by right clicking.

How to do it?

For example, in Excel 2002, Insert, Name menu item, I want to get when I
right click anywhere in the sheet.

Regards
Sam
 
R

Ron de Bruin

Hi Murthy

I don't try it with your example but this will give you a start

Sub Test_Cell_Menu()
' Add Paste Values to the menu
Application.CommandBars("cell").Controls. _
Add Type:=msoControlButton, ID:=370, before:=1
End Sub


Sub Reset_Cell_menu()
'to reset the menu
Application.CommandBars("cell").Reset
End Sub


I have info on my site also
http://www.rondebruin.com/menuid.htm

See also

http://support.microsoft.com/default.aspx?scid=kb;en-us;830502&Product=xlw
How to customize menus and menu bars in Excel

http://support.microsoft.com/default.aspx?scid=kb;en-us;213209&Product=xlw
XL2000: Sample Macros that Customize and Control Shortcut Menus

http://support.microsoft.com/default.aspx?scid=kb;en-us;213550&Product=xlw
XL2000: Sample Macros for Customizing Menus and Submenus

http://support.microsoft.com/default.aspx?scid=kb;en-us;166755&Product=xlw
XL97: WE1183: "Customizing Menu Bars, Menus, and Menu Items"

http://support.microsoft.com/default.aspx?scid=kb;en-us;159619&Product=xlw
XL97: Sample Macros for Customizing Menus and Submenus

http://support.microsoft.com/default.aspx?scid=kb;en-us;162878&Product=xlw
XL97: Sample Macros That Customize and Control Shortcut Menus
 
M

Murthy

Hi JE/ Ron,

Thanks to both of you!

My work is done. And I have learnt something new. It gives great
productivity enhancing possibilities.

Regards
Sam (Murthy)
 

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