Customize the ribbon and how to add your macros
Save links to your favorite macros in a personal tab on the ribbon for easy access and become more productive. I will also show you in this article how to create a personal *.xlsb file that opens automatically every time you start Excel.
I also recommend the Quick Access Toolbar for macros that you use even more often. They are small icons that you can add and link macros to located above the ribbon tabs.
Ribbon tabs have greatly improved user experience since the introduction in Excel 2007, they make it easier for you to find the tool you are looking for. They are categorized in tabs and you can create and customize one easily yourself.
What's on this page
- Create a new tab to the ribbon
- Rearrange tabs on the ribbon
- Hide tabs on the ribbon
- How to unhide tabs on the ribbon
- How to remove tabs on the ribbon
- How to reset tabs on the ribbon
- Create a button and link macro
- Create a personal *.xlsb file
- How to save VBA code to the *.xlsb file
- Recommended macros to save in your personal.xlsb file
- Show only tabs and hide the command buttons
- Autohide the ribbon
- How to enable the Draw tab on the ribbon
- How to enable the Developer tab on the ribbon
You can also customize pop-up menus that appear when you right/click on a cell or object.
There are a few ways to access the ribbon customization settings:
- File -> Options -> Customize ribbon
- Right-click on the ribbon -> Customize the Ribbon...
Create a new tab on the ribbon
Excel allows you to customize the ribbon and link your personal macros to a button each. So you can quickly and easily access your favorite macros.
- Go to "File" on the ribbon.
- Click "Options".
- Click "Customize Ribbon".
- Click "New tab" button, see image above.
- Click "Rename" button.
- Rename the tab, I named it "Personal macros".
- Click OK button to dismiss the "Rename" dialog box.
- Click OK button to dismiss the "Excel Options" dialog box.
How to rearrange tabs on the ribbon
- Click on File on the ribbon located on the top left corner of your Excel window, see image above.
- Click Options in the lower-left corner. A dialog box appears.
- Click "Customize Ribbon".
- Select one of the tabs, I selected the "Home" tab in this example.
- Click on one of the arrow buttons to move the "Home" tab on the ribbon. The order is important, the top item will be the left-most item on the ribbon.
- Click OK button.
How to hide tabs on the ribbon
- Click on File on the ribbon.
- Click Options in the lower-left corner. A dialog box appears.
- Click "Customize Ribbon".
- Disable the checkbox next to a ribbon tab name you want to hide.
- Click OK button.
How to unhide tabs on the ribbon
- Click on File on the ribbon.
- Click Options in the lower-left corner. A dialog box appears.
- Click "Customize Ribbon".
- Enable the checkbox next to a ribbon tab name you want to unhide.
- Click OK button.
How to remove tabs on the ribbon
- Click on File on the ribbon.
- Click Options in the lower-left corner. A dialog box appears.
- Click "Customize Ribbon".
- Right-click on the tab you want to delete.
A pop-up menu appears. - Click "Remove" on the pop-up menu.
- Click OK button.
How to reset tabs on the ribbon
- Click on File.
- Click Options in the lower-left corner. A dialog box appears.
- Click "Customize Ribbon".
- Click the "Reset" button.
- Click "Reset all customizations".
- Click OK button.
Create a button and link to macro
- Select macros from the drop-down list, see image above.
- There are now macros below the drop-down list, select a macro.
- Click "Add" button.
- Click "Rename". A new dialog box appears.
- Pick an icon and type a new name.
- Click OK button.
- Click OK button again.
Create a personal *.xlsb file
- Create a new workbook (CTRL + n)
- Go to VB Editor (Alt + F11)
- Insert a module
- Copy macros to module
- Exit VB Editor and return to excel
- Save workbook as a *.xlsb file to this folder:
C:\Users\<username>\AppData\Roaming\Microsoft\Excel\XLSTART - Exit excel
- Start excel
- Your personal.xlsb file opens automatically
- Go to tab "View" on the ribbon
- Click "Hide" button
- Exit excel
A new workbook is created next time you start Excel. The personal.xlsb opens but is hidden.
How to save VBA code to the *.xlsb file
You can now save macros and User Defined Functions to the Personal.xlsb file.
- Press Alt+F11 to open the Visual Basic Editor.
- Locate the Personal.xlsb workbook in the Project Explorer.
- Click + (plus sign) next to workbook name to expand contents.
- Expand contents in Modules folder.
- Double click on module named Module1.
- Paste code to window, see image above.
- Click "Save" button on the top menu.
Recommended macros for your ribbon
Remove print preview lines (Page Breaks)
Have you ever wondered how these lines got there on a worksheet? They show where pages will break, in other […]
Remove print preview lines (Page Breaks)
How to highlight row of the selected cell programmatically
Today I would like to share with you these small event handler procedures that make it easier for you to […]
How to highlight row of the selected cell programmatically
Example macros to save in your personal.xlsb file
The following links take you to articles demonstrating macros that you may find useful.
- Remove print preview lines (Page Breaks)
- Create links to all sheets in a workbook
- Insert hyperlinks to all files in current folder
- Follow hyperlinks in a pivot table
- Select cell A1 on all sheets before you close a workbook
- List files in a folder and subfolders
How to show tabs only on the ribbon
Double-click with left mouse button on any tab name to toggle between showing and hiding the buttons on the ribbon.
This is great if you temporarily need more cells visible on your worksheet.
You can also click the up-arrow located on the top right corner. This will show a pop-up menu with three options:
- Auto-hide Ribbon
- Show Tabs
- Show Tabs and Commands
Click on "Show Tabs", the command buttons are now hidden.
How to autohide the ribbon
Click the up-arrow located on the top right corner. This will show a pop-up menu with three options:
- Auto-hide Ribbon
- Show Tabs
- Show Tabs and Commands
Click on "Auto-hide Ribbon", this will completely hide the ribbon and maximize the Excel window if it isn't already.
Move the mouse to the top of your screen to show the top bar, click on the top bar to temporarily show the ribbon again.
Click on the command button or command buttons you want to use, as soon as you click below the ribbon it disappears again.
How to show the Draw tab on the ribbon
The Draw tab is available in Excel 2019 and Excel 365 subscription, however, some command buttons appear only in Excel 365.
The Draw tab contains features that allow you to use your mouse, touchscreen or a digital pen to write text, notes, comments, etc.
- Click on File.
- Click Options in the lower-left corner. A dialog box appears.
- Click "Customize Ribbon".
How to show the Developer tab on the ribbon
- Click on File.
- Click Options in the lower-left corner. A dialog box appears.
- Click "Customize Ribbon".
- Click the checkbox next to "Developer" to enable it.
- Click OK button.
Read more
Copy your macros to a Personal Macro Workbook
Excel 2010 Customizable Ribbon
Quick Access Toolbar in Excel: how to customize, move, reset and share
This article demonstrates a macro that copies values between sheets. I am using the invoice template workbook. This macro copies […]
Open Excel files in a folder [VBA]
This tutorial shows you how to list excel files in a specific folder and create adjacent checkboxes, using VBA. The […]
Split data across multiple sheets [VBA]
In this post I am going to show how to create a new sheet for each airplane using vba. The […]
Identify missing numbers in a column
The image above shows an array formula in cell D6 that extracts missing numbers i cell range B3:B7, the lower […]
Working with COMBO BOXES [Form Controls]
This blog post demonstrates how to create, populate and change comboboxes (form control) programmatically. Form controls are not as flexible […]
Change chart data range using a Drop Down List [VBA]
In this article I will demonstrate how to quickly change chart data range utilizing a combobox (drop-down list). The above […]
This workbook contains two worksheets, one worksheet shows a calendar and the other worksheet is used to store events. The […]
Run a Macro from a Drop Down list [VBA]
This article demonstrates how to execute a VBA macro using a Drop Down list. The Drop Down list contains two […]
What's on this page Copy a file Copy and rename a file Rename a file List files in a folder […]
How to create an interactive Excel chart [VBA]
This article describes how to create an interactive chart, the user may click on a button or multiple buttons and […]
4 Responses to “Customize the ribbon and how to add your macros”
Leave a Reply to Mdeva
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
I’ve got my two macro’s placed up on my ribbon, each with a nice icon, and each calls up a user form. When it work, it works great. Then, mysteriously, it started disabling itself whenever I selected a different workbook, and then switched back. Message appears that the macro’s aren’t enabled, or some such. After lots of frustration, I randomly discover that if I called up one of the macros manually, within the Developer/Macros/ option, the two ribbon icons were now functional again. They work dependably until I leave the workbook and return again. Any idea of a permanent fix for this? Thanks so much,
Steve
Interesting theory
Doesn't work
Put the file WHERE?!
How can I save it and send to other people?
Thuan Ha,
It seems that you can't create a custom ribbon programmatically:
https://stackoverflow.com/questions/8850836/how-to-add-a-custom-ribbon-tab-using-vba
https://www.excelfox.com/forum/showthread.php/105-Add-ribbon-programmatically-to-Excel-2010-using-VBA