converting CommandBars VBA code to work with ribbons

stjones

New Member
Joined
May 17, 2010
Messages
5
Hi all,
Brand new to this forum, but not to Excel. I've been coding VBA for many years.

An app that I created 7 or 8 years ago does a lot of manipulation of the commandbar controls, including hiding and/or disabling many of the items on built in commandbars and adding custom items to those commandbars.

When the user opens the file macros run to remove certain commands and add some custom commands, and when they close it I restore the default commandbars by doing a reset.

But now that we have 2007, running this code 'hides' the ribbons and creates the old builtin commandbars (file, edit, view, Window, Help) with some default commands removed, and some custom commands added. Now when the codes does a reset, it removes the commandbars but does not restore the ribbons.

I haven't been able to find much that will help me with this ... has anyone here seen this, or have any insight on how to work with the ribbons from within the VBA code?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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