MenuRighter – Excel 2010 and Later
MenuRighter is an Excel addin that lets you modify right-click menus. You can add almost any control found in other right-click menus or Excel 2003’s “classic” menus – such as the Edit menu, Freeze Panes button, and even your own addin menus. You can also rearrange right-click menus, delete buttons, or move buttons up from a sub-menu. For example you can copy “Filter by Selected Cell’s value” to the root level of the Cell context menu.
MenuRighter lets you search through right-click menus such as Cell, Drawing Objects, and Pivot Table, along with Excel 2003 top-level menus like File and Edit, plus any custom commandbars you’ve created. You can then insert them into almost any right-click menu. Here’s a quick example, where the Freeze Panes command is added to the Row menu and its Cut, Copy and Paste buttons are deleted:
I first wrote MenuRighter in December 2011 and it’s been downloaded a couple of times a day since then. The original version relied more on users knowing where commands were located in Excel 2003. This current version lets you just search for controls by right-click menu, name, ID or the 2003 menu they were found in. So if you want to add Goal Seek to the cell menu, a quick search is all you need.
This version of MenuRighter works with Excel versions from 2010 and later. (For Excel 2003 and 2007 versions visit the old MenuRighter page.) Here’s how it works:
Why it Works
The ribbon replaced the old Excel 2003 File, Edit, etc., menu structure. But the 2003 menus and controls still exist in the background. The right-click menus in modern Excel versions are still mostly the same structure as in 2003, with new controls added of course. This all means that we can program changes to the right-click menus using the memu system, and that’s why MenuRighter works.
MenuRighter is an ordinary xlam add-in. If you don’t know how to install add-ins, a quick internet search will get you instructions, such as these from the Contextures website.
When the MenuRighter xlam is installed in 2010 or later, a new menu group appears in the Developer tab. There is a lone MenuRighter toggle button, which you click to show or hide the MenuRighter form. Here’s how to show the Developer tab.
MenuRighter looks like this:
The MenuRighter form is resizable. You can drag to resize or use the upper-right corner buttons.
As you can see above, the source controls are generally on the left. These let you select the commands to add to right-click menus. The target controls are on the right. These let you select the menu to add to, and also to delete and rearrange existing menu buttons.
Let’s look at the Source Controls first:
At the top are two dropdowns and a search box that let you filter to the menu item you want to add. It starts out filtered to the Excel 2003 Add Command toolbar and its File menu. The listbox contains all the controls found in that menu, e.g., Open, Close and a bunch more.
Let’s say you want to add a Freeze Panes button to the Row menu. Because the search box allows wildcards you don’t need to do anything in the first two boxes. Just type “*freez” in the search box. In the default Excel 2016 setup the listbox will show three instances of Freeze Panes from Excel 2003 toolbars. They’re all the same, so you can select any one:
You can refine your search by switching the first dropdown from Full Path to one of the other choices, such as “Control Name.” And the second dropdown can be set to “Contains” or “Exactly Matches.” Generally though, you can just use “Full Path” and “Begins With” with an asterisk at the beginning of the search string.
There are four more controls at the right of the Source Control section:
- The Unique checkbox only applies if you’ve selected Control Name in the first dropdown. It’s on by default and means that only one instance of each control is shown
- The Add button adds the control to the target toolbar once you’ve selected it. (More on that below.)
- The Execute button attempts to execute the currently selected command in the list. If it’s not applicable to your current Excel situation it will be disabled, and even if enabled it may not do anything. But if you click it when Add Command;File;Open is selected, for example, you’ll get the File Open dialog.
- The Show List command shows the entire list of available commands, as currently filtered, in a new worksheet. It’s just a different way to search for menu items to add. If you’re using Excel 2013 or higher, you should close this sheet after you’ve looked at it. (More on that below.)
Semicolon Separator You will notice that I used the semicolon as a separator between menu levels, as in “Add Command;File;Close.” It’s akin to a path separator in Windows. I chose semicolons because they’re not used in menu or control names and it’s in the keyboard home row. You can avoid using them with the judicious use of wildcards, but if you’re typing out a full path you’ll need to include them.
The Target Control section has a dropdown at the top with the names of the shortcut menus (toolbars) that can be modified, such as Cell, Row, and Pivottable Context Menu. Below that is a listbox with all the controls on the selected shortcut menu.
Use the Top, Bottom, Up and Down controls to reposition the currently selected control. The Delete button deletes the currently selected control. Double-clicking also deletes it.
The Rest of the Controls
The mix of functions is a little confusing with these four and I’m not completely satisfied with their captions, but so be it:
- Reset to Default resets the currently selected target toolbar to its Excel default. This means any changes ever made to the selected shortcut menu will be removed.
- Show Current pops up the currently selected right-click menu as configured. It won’t show changes you’ve made until you’ve applied them.
- Clear Changes clears any changes you’ve made to the listbox that haven’t been applied yet.
- Apply Changes applies the changes you’ve made in the listbox.
Clicking any of these controls pops up the actual target menu, which you can use right away! Or later.
One last control, the Show Labels on Menus checkbox, adds a control to each right-click menu with that menu’s name and ID. This is discussed more below.
Putting it all Together
- Select a target shortcut menu (toolbar).
- Search for and select a source control and add it to the target controls list with the Add button or by double-clicking. The control will be placed above the selected control in the target list. If none is selected it will be added to the beginning.
- Repeat step 2 for as many controls as you want to add to the selected target toolbar.
- Reposition or delete controls as desired.
- Apply the changes to the target toolbar with the Apply Changes button.
If you make changes but don’t apply them, you will be prompted to do so if you switch to another target toolbar or close the form:
Finding the Name of the Target Toolbar
It may be that you don’t know the name of a right-click menu. For instance, how many people know that the one for a sheet tab is called “Ply”? This is where the “Show Labels on Menus” checkbox helps. When it’s checked every shortcut menu gets an additional control whose caption is that toolbar’s caption and ID. (The ID is useful for distinguishing between the pairs of Row, Column and Cell shortcut menus. There’s one each for Normal View and Page Break View.)
Adding Other Addin Controls
You can add controls from custom toolbars or addins as well, as long as those addins create classic menus.
Special Considerations with Excel 2013 and Later
With Excel 2013 came the Single Document Interface. This means that each workbook appears in its own window. I’ve used Jan Karel Pieterse’s code to keep the MenuRighter userform on top in these Excel versions.
There’s a bigger issue though that makes it a little trickier to maintain your MenuRighter changes in Excel 2013 and later. Here’s what I’ve figured out. Excel 2013 and later only recognizes toolbar customizations in the workbook that was open when those changes were made, or in workbooks that were opened after the changes were made. So if you open a workbook, then open another, then open MenuRighter and then close the second workbook you opened, your changes will be lost.
The easy way to deal with this is to open Excel, open a workbook, open MenuRighter and then make your changes. After that just close and re-open Excel and the changes will be permanent.
- MenuRighter doesn’t work on chart context menus, as far as I can tell. These menus are some new kind of beast. They can be modified using Ribbon XML
- MenuRighter only allows limited edits to the Ply context menu – the one that appears when you right-click a sheet tab. I’m able to add commands from my own addins but rearranging or adding buttons from built-in context menus doesn’t work. The changes show up in MenuRighter after I’ve made them, but they don’t show up in the actual context menu.
If you are looking for versions that work with Excel 2003 and 2007 go to the old MenuRighter page. Those versions have a different interface and all the instructions are there.