Access.2007.VBA.Bibl..

(John Hannent) #1
FIGURE 15.13

A form custom Ribbon with two buttons, and the message box popped up by the Click Me button.


Customizing the Ribbon with an Access Add-in ................................................................


Because Access add-ins (in previous versions of Access) didn’t add buttons to command bars
(menus or toolbars), you can’t replace old code referencing CommandBars with new code referenc-
ing the Ribbon. However, you can replace a set of menu add-ins with a single menu add-in to load
a custom Ribbon, and place the rest of your add-in’s commands on the Ribbon. As an example, I
made a version of my Extras 2007.accda add-in (the sample database for Chapter 14) and modified
it to load a custom Ribbon.

The sample library database for this section is Extras (Ribbon).accda,

If you are attempting to install an add-in in Access 2007 running on Windows Vista, you
may get the security warning shown in Figure 15.14. Some special techniques are needed
to get Access Ribbon add-ins to work in Vista; see the “Getting Your Add-ins to Work in Vista” sidebar
for details. This is not a problem when installing add-ins for Access 2007 running on Windows XP.

CAUTION CAUTION


NOTENOTE


Customizing the Ribbon with XML in Access Databases and Add-ins 15

Free download pdf