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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,213,511
Messages
6,114,054
Members
448,543
Latest member
MartinLarkin

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