Excel.Tips.Net ExcelTips (Menu Interface)

Changing the Shortcut Menu

The shortcut menus that you see when you right-click on different objects can be very helpful. In Word, it is relatively easy to change the shortcut menus. In Excel, however, changing the menus—while possible—is nowhere near as easy.

In Excel, you can only change the options on a shortcut menu by using VBA. The exact code you use depends on whether you are removing items from a shortcut menu or adding them in. The following code illustrates how to delete an item from a shortcut menu:

Sub Del_Item()
End Sub

Each shortcut menu is really a member of the CommandBars collection, and can thus be manipulated in VBA. In this case, a CommandBar by the name of "Cell" is being manipulated. This just happens to be the command bar for the shortcut menu that appears when you right-click on a cell in a worksheet. Excel has 47 named shortcut menu CommandBars.

If you want to add a command to a shortcut menu, all you do is use code similar to the following:

Sub Add_Item()
    CommandBars("Cell").Controls.Add _
      Type:=msoControlButton, Id:=21, _
End Sub

In this instance you are again manipulating the shortcut menu that appears when you right-click on a cell. You are adding a command that is defined by the Id value setting. In this case, the Id value is 21, which represents the Cut command. There are scores, if not hundreds, of different command IDs within Excel.

To aid you in determining both the Id to use for a command, as well as the names of the various shortcut menu CommandBars, you should refer to the Knowledge Base article 213552. This article is quite long, and can be found at the following address:


The article is written for Excel 2000, but is also applicable to later versions of Excel, through Excel 2003.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (1962) applies to Microsoft Excel 97, 2000, 2002, and 2003.

Related Tips:

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 5+3 (To prevent automated submissions and spam.)
           Commenting Terms

Comments for this tip:

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2016 Sharon Parq Associates, Inc.