Figure 15.5 shows the External Data tab, without the Export group.
FIGURE 15.5
The External Data tab without the Export group.
VBA Code................................................................................................................
To open the References dialog, select References from the Tools menu in the Visual Basic
window.
To run commands from controls on your customized Ribbon, you need to write a callback procedure
for each Ribbon command button. First, set a reference to the Office 12.0 object library in the
References dialog (see Figure 15.6); it is needed to support various Ribbon-related objects in the code.
FIGURE 15.6
Setting a reference to the Office 12.0 object library.
The sample Test Ribbon database contains two procedures to be run from Ribbon buttons on the
List Fields custom Ribbon; note the ByVal control As IRibbonControlargument, which
links the procedure to the control:
Public Sub ListTableFields(ByVal control As IRibbonControl)
On Error Resume Next
TIPTIP
Part III Adding More Functionality to Office