Guidelines for Customizing Toolbars

Microsoft Excel offers you a wide range of ways to modify the built-in toolbar system to better serve the needs of the user. You can create new toolbars; add new toolbar buttons to built-in or custom toolbars; modify the image on a toolbar button face; and assign macros, ToolTip text, and status bar text to toolbar buttons. If a toolbar button contains an edit box or a text box, you can adjust the width of the box.

Whether you modify a built-in toolbar or create a new one depends on the extent of the changes you want to make. Modifying a built-in toolbar makes sense if you're adding or changing only a few toolbar buttons; creating a new toolbar may be more convenient if you want to provide an entirely different assortment of commands than are found on any of the built-in toolbars or if you want to present a number of custom toolbar buttons as a distinct group. Regardless of how many changes you make, you can restore the built-in menu system to its default state whenever you want.

In addition to the above changes, which are usually made at design time, you can use Visual Basic procedures to change the properties of toolbars and toolbar buttons in response to user input while your application is running (at run time). For example, you can hide a toolbar when the user no longer needs it, move or resize a toolbar to keep it out of the user's way, disable a toolbar button to prevent the user from clicking it at an inappropriate time, or switch between the "pushed" appearance and the "not pushed" appearance of a toolbar button every time the user clicks it.