Add an item for MACROS to the Excel menu bar

  • Friends,


    Please, is it possible...?


    Here we have the usual Excel menu bar:


    File / Edit / View / Insert / Format / Tools / Data / Window / Help


    When we press ALT+F8, a small window appears with all MACROS available for us to run. Is it possible to add an item to the menu bar which shows the same contents that are shown when we press ALT+F8?


    The menu bar should be something like this:


    File / Edit / View / Insert / Format / Tools / Data / Window / Help / Macros


    Then when we press the item "Macros", it shows all macros available (just like the other itens from the menu bar) and when we click one of those macros, it is run!


    (If we open a file which doesn't contain any macros, the item Macros can be hidden... Or not! It's up to you!)


    Anybody knows how to do that? :)


    Thanks for your attention, guys.


    Hugs. :)


    Bruno

  • Re: Add an item for MACROS to the Excel menu bar


    The best moethod of doing this will depend on whether the macros are stored in the workbook itself or as an addin.


    If they are in the workbook it is relatively easy to add a menu.
    1. Click view>toolbars>customise.
    2. Select Commands and scroll down to "new menu" in the categories.
    3. Click and drag the "new menu" from the commands window on the right to the menu bar.
    Now if you right click on it you can change its name and other properties.


    4. Next click on the new drop down menu you have just added and it will open with a blank box.
    5. Return to the dialog window and select macros from the categories on the lefthand side.
    6. On the righthand side drag the "new menu item" to the empty box on your menu bar. Now you can right click this and change its properties and add a macro.


    Repeat steps 4-6 for each macro you want to add.


    You could copy the macros to a new workbook and then carry out the above provedure then save it as an add in. This can then be installed and the macros will be available to all workbooks.


    I don't know about having some macros available and not others but I am sure somebody with more knowledge will answer that.


    I hope this helps and is easy enough to understand.

  • Re: Add an item for MACROS to the Excel menu bar


    Friends,


    Sorry, I guess I didn't make myself clear. I'll try to explain it better... :)


    Actually, I don't want to open/show the Macros Dialog Box. I just want all availables macros "inside" the new menu.


    For example...


    Inside the menu "File" we have: New / Open / Close / Save / Save As / etc...
    Inside the menu "Edit" we have: Can't Undo / Can't Repeat / Cut / Copy / Paste / etc...
    And so on...


    So, I'd like to know if it's possible to add something like that...


    Inside the new option "Macros" we would have: Macro1 / Macro2 / Macro3 / Macro4 / etc... (all macros available)


    Then, if we want to run Macro3, for example, we click on "Macros" and then click on "Macro3" (and Excel runs Macro3 right away).


    The solutions posted here was a button (a shortcut) to call/show the Macros Dialog Box, but this is not what I really want. Sorry if I didn't express myself correctly.


    So, is it possible to do that (show all available macros inside the menu)? If not, that's OK. I'll use what you taught me first, no problem. :)


    Anyway, thanks everybody for the attention. I really appreciate it.


    Hugs for all. :)


    Bruno.

  • Re: Add an item for MACROS to the Excel menu bar


    If you follow my method it will add a new menu after help which you can name as you please. So you will have


    File/Edit/View/Insert/Format/Tools/Data/Window/Help/YOUR MENU


    When you click on YOUR MENU it will drop down and you will see all your macros.


    YOUR MENU/Macro 1/Macro2/Macro3 etc etc


    I guess you can add menus items to the file menu if you wish instead.

  • Re: Add an item for MACROS to the Excel menu bar


    keithccs,


    I see your point, but unfortunately that's not exactly what I need, for I don't need "the same macros" for different files. Each file has its own macros. So I need the menu to show me the macros available for each and every opened file only. :)


    Actually, I don't know if what I want is possible. If so, I want to know how to do it. If not, that's OK! :)


    But I also kept your method with me for future needs. Thank you. :)


    Bruno

  • Re: Add an item for MACROS to the Excel menu bar


    Hi Bruno,


    I should be possible to do what you want.
    The attached workbook has code that will list all available sub routines.


    The code is pretty rough and could probably be made more efficent but should be readable.


    It does not create and populate a menu but there is plenty of examples of that to be found here and on the other forums you have posted.

  • Re: Add an item for MACROS to the Excel menu bar


    Andy,


    Sorry for the cross-posts. It's because I believe the more sources we have, the more different "thoughts" we get.


    Different people access different forums and, consequently, bring us excellent different solutions. Some of them wiser than others, smoother, etc.


    I know it's wrong and goes against the rules of the Forums, but that's my point of view.


    But I apologize for that, anyway.


    Hugs,


    Bruno

  • Re: Add an item for MACROS to the Excel menu bar


    Andy,


    Huuuuummm! Cool! :)


    Sorry, I swear... I thought we couldn't mention other Forums, pasting links here. I thought it wasn't allowed! Good to know! Thanks for the advice! :)


    Hugs,


    Bruno