O'Reilly logo

Excel 2016 Power Programming with VBA by Richard Kusleika, Michael Alexander

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17 Working with the Ribbon

In This Chapter

  • Looking at the Excel Ribbon UI from a user’s perspective
  • Using VBA to work with the Ribbon
  • Customizing the Ribbon with RibbonX code
  • Looking at examples of workbooks that modify the Ribbon
  • Using boilerplate code for creating an old-style toolbar

Ribbon Basics

Beginning with Microsoft Office 2007, the primary user interface was changed from menus and toolbars to the Ribbon. While there are similarities between toolbars and the Ribbon, the Ribbon is radically different, particularly when it comes to VBA.

The Ribbon is made up of a hierarchy of tabs, groups, and controls. The tabs appear across the top. Each tab consists of one or more groups and each group consists of one or more controls.

  • Tabs: The top object in the Ribbon hierarchy. You use tabs to separate the most fundamental operations into logical groups. The default Ribbon contains the Home, Insert, Page Layout, Formulas, Data, Review, and View tabs. You can add controls to existing tabs or create new tabs. For example, you might make a new tab with your company’s name that contains controls for code that’s specific to your company’s operations.
  • Groups: The second highest object in the Ribbon hierarchy. Groups contain any of the number of different types of controls and are used to logically separate operations supported by a Ribbon tab. The default Formulas tab contains the Function Library, Defined Names, Formula Auditing, and Calculation groups. You don’t have include ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required