Microsoft Office 2000 Developer   

Activating and Inserting Controls

See Also

Before you can use any of the controls provided with Microsoft Office 2000 Developer, you must activate them. Then, once a data source has been created, you can place controls on any container form that is capable of hosting an ActiveX control.

The process for inserting controls on a host document is slightly different than for inserting controls on a UserForm in a VBA project.

For more information about using controls to display data, see Displaying Data from a Data Source.

Activating and Inserting Controls on a VBA Project

To activate controls on UserForms in your VBA project

  1. In the Visual Basic Editor, with your UserForm open, right-click on or near a control on the Toolbox.

  2. Click Additional Controls to display a list of all available ActiveX controls.

    Note   The list is dynamically created, and many controls that appear will have been installed by various applications or downloaded from the Internet. However not all controls are suited to be placed in the host containers listed earlier. Doing so can result in unexpected behavior.

  3. Select the desired control from the list. Office 2000 Developer controls are listed as:
  4. Click OK.

Once the control is activated, an icon for that control is added to the Toolbox.

To insert controls on your UserForm

  1. In the Toolbox, select the control you want to use.

  2. On your container form, draw the control it represents.

Activating and Inserting Controls in a Host Document

You can also insert controls directly into your host document. For example, you can draw a DataList control on your Excel spreadsheet.

To activate and insert controls in your host document

  1. In the host application, right-click the menu bar, and click Control Toolbox.

  2. Click the More Controls icon to display a list of all available ActiveX controls.

    Note   The list is dynamically created, and many controls that appear will have been installed by various applications or downloaded from the Internet. However not all controls are suited to be placed in the host containers listed earlier. Doing so can result in unexpected behavior.

  3. Select the desired control from the list, and click OK.

  4. Use the cursor to draw the control on the host document.

    Note   In Word, the control is added automatically to your page.

  5. The control appears and is ready to use.