Example

This example lists the current project references in the Visual Basic Editor's Immediate Window.

Public Sub ShowProjectsReferences()

Dim myProject As VBProject

Dim n As Integer

Set myProject = Session.VBProject

 

n = myProject.References.Count

 

'Display names of references in the Immediate Window

While n > 0

Debug.Print myProject.References(n).Name

n = n - 1

Wend

End Sub