ActiveVBProject Property
Applies To
VBE object.
Description
Returns the active project in the Project window. Read-only.
Remarks
The ActiveVBProject property returns the project that is selected in the Project window or the project in which the components are selected. In the latter case, the project itself isn't necessarily selected. Whether or not the project is explicitly selected, there is always an active project.
See Also
VBProject object, VBProjects collection.
Example
The following example uses the ActiveVBProject property to return the name of the active project.
Debug.Print Application.VBE.ActiveVBProject.Name