References dialog box

References dialog box

Allows you to select another application's objects that you want available in your code by setting a reference to that application's object library.

The following table describes the dialog box options.

Option Description
Available References Lists the references available to your project.

After you set a reference to an object library by selecting the check box next to its name, you can find a specific object and its methods and properties in the Object Browser.

If you are not using any objects in a referenced library, you should clear the check box for that reference to minimize the number of object references Visual Basic must resolve, thus reducing the time it takes your project to compile. You can't remove a reference for an item that is used in your project.

If you remove a reference to an object that you are currently using in your project, you'll receive an error the next time you refer to that object.

References not in use are listed alphabetically.

NOTE: You can't remove the "Visual Basic For Applications" and "Visual Basic objects and procedures" references because they are necessary for running Visual Basic.
Priority buttons Move references up Move up and down Move down on the list.

When you refer to an object in code, Visual Basic searches each referenced library selected in the References dialog box in the order that the libraries are displayed. If two referenced libraries contain objects with the same name, Visual Basic uses the definition provided by the library listed higher in the Available References box.
Result Displays the name and path of the reference selected in the Available References box, as well as the language version.
Browse Displays the Add References dialog box so that you can search other directories for and add references to the Available References box for the following file types:

- Application-specific files for Excel (.xlsm, .xlam), PowerPoint ( .ppam), and Word (.docm, .dotm)
- Type Libraries (*.olb, *.tlb, *.dll)
- Executable Files (*.exe, *.dll)
- ActiveX Controls (*.ocx)
- All Files (*.*)

The Add References dialog box is the Open common dialog box.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.