Categorized | excel tips

Add Custom Menu to Excel Toolbar

You can add a custom menu to the excel toolbar using a simple VBA code. All you need to achieve this is to get a handle on one of the already existing menu items in the excel menubar. Once you have the handle, you can write a simple instruction for excel to add a custom menu item right before or after that specific item in the menu bar. Once that is done, it is just a simple step from there to add sub menu options and create a tree like structure. You can download the custom menu in excel worksheet here.


How do you make it work

We need to ensure that the above code executes right after the workbook loads so that the user does not have to wait. Hence the menu creation code needs to execute when the Workbook_Open function is called. If you want, you can develop this a little further by adding a customized menu to each of your excel spreadsheets. The idea here to delete the menu when the user moves to a different worksheet and on activation of the new worksheet, call the Workbook_SheetActivate function of that particular sheet to display its own customized menu. The important point to know is to which function to place under the workbook open function and what under worksheet activate function.

Also note that you don’t have to call the specific function by name every time you have a worksheet getting activated. You can simply write two generic functions. The first one simply takes in sheet name as a parameter and adds or deletes the customized menu. The second one is the master function that calls the first one when the worksheet either gets activated or deactivated. Using a combination of both, you can simply create customized menu for each of the excel worksheets in a workbook.

Excel Formula, Excel Chart, Excel Macro, Excel VBA, Pivot Table Excel, Excel Dashboard

What Do You Think ?

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Comments and Trackbacks

  1. eleazar wrote:

    it appears in Add-Ins Menu


Keep up with the latest stories - Delivered right to your inbox


English flagItalian flagKorean flagChinese (Simplified) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagDutch flagHindi flagFilipino flagIndonesian flagThai flagTurkish flagPersian flag
treeemap software for excel