
A VBA project that is open in the Visual Basic Editor is represented by the VBProject object.

The VBE object contains the collection of projects. The top-level object in the VBA Extensibility Library object model is the VBE object, which represents the Visual Basic Editor itself. In the Visual Basic Editor window, choose Tools | References, check Microsoft Visual Basic for Applications Extensibility 5.3 Library, and click OK. Note: If access to VBProjects is not enabled, an attempt to run a VBA procedure that accesses objects from the VBIDE Library results in the following error message: "Programmatic access to Visual Basic Project is not trusted."Ģ. Click the Trusted Sources tab, select the Trust Access to Visual Basic Project check box, and click OK.

In the Microsoft Excel application window, choose Tools | Macro | Security. Before you can use the objects from the VBIDE library, you must do two things: To program and manipulate Visual Basic Editor (VBE) in code, you need to access objects contained in the Microsoft Visual Basic for Applications Extensibility 5.3 Library (VBIDE).
