MS Office Bug/Feature #5: Cumulative toolbars in Excel
When you create a custom toolbar in Word, you specify its scope at that point. In other words, where do you want to save it? Normal.dot, some_other.dot, this_document.doc?
In Excel, things work slightly differently.
Suppose you create a custom toolbar with some fairly obscure macro buttons on it. These might be of no use outside of a particular workbook, so you want the toolbar to appear when this specific workbook is opened, and to disappear again when the workbook is closed.
When you create a new toolbar in Excel, it becomes part of Excel’s workspace by default. If you want it to live inside a particular workbook you must attach it to that workbook, and you can then delete it from the Excel workspace. OK, sounds good.
What happens is that when you open this workbook the toolbar appears. Cool. You then close the workbook. The toolbar hangs around. Er, not cool.
As explained here http://www.microsoft.com/exceldev/articles/toolbatt.htm, if you want to change an embedded toolbar you have to unlink, change, and link again, otherwise you are likely to lose your changes.
The summary is as follows:
Remember that if you want a custom toolbar to be available only to your custom workbook or to a workbook based on your custom template, you must delete the toolbar each time the workbook is closed.
That’s not very realistic, now, is it!
You could probably write a macro that is activated onClose for your workbook and deletes the toolbar from the workspace in an attempt to tidy up after itself. This doesn’t sound very safe to me.
All in all, this isn’t a show-stopper of a problem. However, if you’re trying to train people how to create toolbars in Excel, things are likely to get messy: the trainees are much more likely to run into toolbars that already exist with the same name as the toolbar they are trying to create, put there by previous trainees running through the same course.
In any case, anyone who has to deal with lots of spreadsheets from various sources is just going to find that the accumulate unknown and unwanted toolbars over time.