How to add a menu bar in Excel 2007 ribbon?

Posted on 2009-02-20
Last Modified: 2013-11-10

I'm just beggining to use the Visual Studio 2005 Tools for the Microsoft Office System, and I've tested to add a menubar to the ribbon of Excel 2007, but it doesn't seem to work.

I don't have any error message, and I know that my menu bar has been added when I count items, but nothing appears.

Any idea?

Thanks by advance,
Excel.MenuBar bar =  Application.MenuBars.Add("Menu 2007");

Open in new window

Question by:JulienVan
    LVL 2

    Author Comment

    I've seen a tutorial that uses a VSTO project "Other Project Types->Extensibility->Shared Add-in" to add a menu in the ribbon.
    Do you think that it's the only way to do this (I was trying to customize the ribbon in a standard VSTO Excel add-in)?
    LVL 23

    Accepted Solution

    You should be able to use a standard VSTO Excel add-in.  You should be able to add an new item to the project (call Ribbon support) that you can manipulate to do what you are looking for.  Have a read through this MS tutorial -  
    Pages 15-29 should get you going in the right direction.
    LVL 2

    Author Comment

    Thanks, I added a ribbon item to my project and configured the xml file, and it worked!

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now