What You Can Do with Excels Menus

Typical Excel users get by just fine with the standard menus. Because you're reading this book, however, you're probably not the typical Excel user. You might want to modify menus to make your life easier and to make life easier for the folks who use the spreadsheets that you develop.

To modify Excel menus, you can remove elements, add elements, and change elements. In addition, you can temporarily replace Excel's standard menu bar with one of your own creation. You can change Excel's menus two ways: manually, or with Visual Basic for Applications (VBA) code.

When you close Excel, it saves any changes that you've made to the menu system, and these changes appear the next time that you open Excel. The information about menu modifications is stored in your XLB file.

See Chapter 22 for more information about the XLB file.

In many situations, you won't want your menu modifications to be saved between sessions. Generally, you'll need to write VBA code to change the menus while a particular workbook is open and then change them back when the workbook closes. Therefore, you'll need VBA code to modify the menu when the workbook is opened and more VBA code to return the menus to normal when the workbook is closed.

Was this article helpful?

0 0

Post a comment