Export (0) Print
Expand All
Expand Minimize

References Dialog Box

This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

Gg251371.referdia_ZA01201648(en-us,office.14).gif

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.

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 your are currently using in your project, you will receive an error the next time you refer to that object.

  • References not in use are listed alphabetically.

    NoteNote

    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

Moves references up, Gg251371.tbr_pri1_ZA01201723(en-us,office.14).gif, and down, Gg251371.tbr_pri2_ZA01201724(en-us,office.14).gif, 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 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 Reference dialog box so that you can search other directories for and add references to the Available Resources box for the following types:

  • 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.

Show:
© 2014 Microsoft