Can CommandBars and Ribbon code co-exist?

PoggiPJ

Active Member
Joined
Mar 25, 2008
Messages
330
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.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
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.
 
Upvote 0
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?
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top