Disappearing Toolbar Buttons for Macros

Written by Allen Wyatt (last updated December 16, 2023)
This tip applies to Excel 97, 2000, 2002, and 2003


Gary wrote about a frustration he experienced with Excel. He had some macros, stored in his Personal.xls workbook, that were assigned to some custom toolbar buttons. Out of the blue, the macros disappeared, and Gary couldn't figure out why.

There are any number of reasons why this could happen, so it is very hard to narrow down to a definitive answer. There are a few things to check, however.

Toolbar customizations are stored in a file with an extension .XLB. The main portion of the file name varies based on your version of Excel and Windows. The name may be something like excel10.xlb or some name containing your user ID and a version number. It is usually on the C:\ drive and often in Windows folder or in a personal settings folder (on my system it is C:\Documents and Settings\Allen L. Wyatt\Application Data\Microsoft\Excel\Excel11.xlb.)

The XLB file may become corrupt for various reasons. Because of this, it is a good idea to make a backup of the file so that if it ever gets modified unintentionally or somehow gets corrupted, you can just delete the old one and rename the backup.

The XLB file can be "lost" in various ways. Most often it is due to sloppy programming. Some programmers may decide to make changes to the toolbars to add their own customizations, or they may decide to change the configuration of Excel's menus. All these changes get written to the XLB file, and this is not normally a problem. It can become a problem, however, if Excel ends abnormally and the programmer's code doesn't restore the toolbars or menus in the way it should.

Even if Excel doesn't exit abnormally, there could still be problems introduced by the programmer's code. Excel does not include a command to restore the toolbars to some saved configuration. Programmers often write code to check out the status of all the toolbars and then reverse the steps to get back to that condition, but if the code has errors in it, then the toolbars may be left in an unstable or (worse yet) unusable condition. This is bad.

The solution is to rely on your backup of the XLB file. You need to make sure that you save the file so that you can restore it if you detect a problem with the toolbars or menus. If you make any changes that you want to keep, make a new backup of the XLB file. This is nothing but cheap insurance.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

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

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Locked File Puzzle

What would you do if every time you opened a workbook Excel told you it was locked? Here's how you can try to recover ...

Discover More

Specifying a Collating Sequence for Indexes

The indexing feature provided by Word can be a great help, but in some situations, it may not sort your index as you ...

Discover More

Easily Changing the Default Drive and Directory

Need a quick way to change the default drive and directory in a macro you are writing? Here's the commands to do it and a ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (menu)

Weird Actions for Arrow Keys and Enter

If your arrow keys and the Enter key aren't working as you expect them to, the problem could have any number of causes. ...

Discover More

Grabbing a User's Name from Excel

One of the settings you can make in Excel is to specify a user's name. This name is accessible through macros, and can ...

Discover More

Floating Information in a Frozen Row

You can freeze information in rows or columns using one of the built-in features of Excel. As you move up or down in the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven more than 7?

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


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.