Results 1 to 3 of 3

Thread: Can CommandBars and Ribbon code co-exist?
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular PoggiPJ's Avatar
    Join Date
    Mar 2008
    Location
    Maryland, USA
    Posts
    330
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Can CommandBars and Ribbon code co-exist?

    I would like my 2003 VBA application to support 2010 users as well so I can avoid maintaining multiple versions. I modify the 2003 menus with code like the following excerpt...
    Code:
        'Reset any prior menu bar changes
        MenuBars(xlWorksheet).Reset
         
    '------------------------------------------------------------------------------------
    'Add the top-level DEALMAKER TOOLS menu to the Worksheet CommandBar
    '------------------------------------------------------------------------------------
                    Set MenuObject = Application.CommandBars(1). _
                        Controls.Add(Type:=msoControlPopup, _
                        Before:=10, _
                        temporary:=True)
                    MenuObject.Caption = "ELA Tools"
    
        'Add menu BUTTON control to OPPORTUNITY CONTROL PANEL
        Set MenuItem = MenuObject.Controls.Add(Type:=msoControlButton)
                    MenuItem.Caption = "Display Opportunity Control Panel"
                    MenuItem.OnAction = "DisplayOpportunityForm"
                    MenuItem.FaceId = 563
    Since I can test Application.OperatingSystem, could I use that to take a different branch and create a specialized Ribbon tab with identical menu options for my Excel 2010 users, all within the same application.
    Regards,
    Peter Poggi
    North Potomac, MD
    USA

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Can CommandBars and Ribbon code co-exist?

    For the Ribbon, you need an XLSM or XLAM file. If you can get your 2003 users to install the addin that allows them to open those files, then you can have one version, if not, then no, a separate module won't work.
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  3. #3
    Board Regular PoggiPJ's Avatar
    Join Date
    Mar 2008
    Location
    Maryland, USA
    Posts
    330
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Can CommandBars and Ribbon code co-exist?

    Quote Originally Posted by Juan Pablo González View Post
    For the Ribbon, you need an XLSM or XLAM file. If you can get your 2003 users to install the addin that allows them to open those files, then you can have one version, if not, then no, a separate module won't work.
    That sounds very workable. Where may I find the required addin?
    Regards,
    Peter Poggi
    North Potomac, MD
    USA

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •