Appendix E. RibbonX Naming Conventions

To help you avoid confusion when writing callbacks in a VBA project, we devised an easy-to-follow naming convention for your RibbonX objects. When naming objects, you can, of course, follow your own whims — but when other people need to interpret your code, following a standard style can make life a whole lot easier for everyone. Additionally, naming conventions can minimize conflicts when sharing customizations or moving them to additional projects. Moreover, you'll definitely appreciate having used naming conventions when you later have to interpret and modify code that you wrote months or years before.

We do not expect you to blindly follow the recommendations laid out here. Rather, we are sharing our advice with the hope that it guides you to make prudent choices that not only make it easier to create customizations, but also avoid conflicts and make it a lot easier and less frustrating when it comes time to interpret and share your customizations.

How Our Naming System Works

The naming convention we devised is based on the Reddick naming convention.

Note

A description of the Reddick convention (RVBA) can be found at www.xoc.net/standards/rvbanc.asp.

Our convention also includes parts from VBA and throws in the naming of attributes from the XML Schema for the Ribbon. Therefore, our naming convention includes an identifier for the Ribbon, the control, and the action to be invoked.

Thus, you when you have a button control and want to use the onAction ...

Get RibbonX: Customizing the Office 2007 Ribbon now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.