Programming the "Ribbon" in Excel

Occasional Contributor

How do you access the ribbon in an Office application (Excel) using VBA?

I can't find anyway to access the ribbon object in an open Excel file using VBA.

The application object has many items and collections, but none lead you to the ribbon object, which must have application specific properties and methods.


Any suggestions?



1 Reply


Standard VBA does not support customizing the ribbon. You need XML too. See for example How to Customize the Excel 2016 Ribbon with XML