'-------------------------------------------------
'- -
'- Lister les references utilisés dans un projet -
'- -
'-------------------------------------------------
Sub Lister_LesGuids_Références()
Dim X As Integer, Sh As Worksheet
Dim NbRef As Integer, A As Integer
Set Sh = Worksheets.Add(After:=Sheets(Sheets.Count))
On Error Resume Next
With Sh
.Name = "GUIDS"
.Cells(1, 1) = "Nom de la bibliothèque"
'Son appellation dans la fenêtre Reférences
.Cells(1, 2) = "Description"
.Cells(1, 3) = "Guid"
.Cells(1, 4) = "Major"
.Cells(1, 5) = "Minor"
.Cells(1, 6) = "Chemin complet"
With .Range("A1:F1")
.Font.Bold = True
.Font.Size = 12
End With
With Sh.Parent.VBProject.References
NbRef = .Count
X = 2
For A = 1 To NbRef
Sh.Cells(X, 1) = .Item(A).Name
Sh.Cells(X, 2) = .Item(A).Description
Sh.Cells(X, 3) = .Item(A).GUID
Sh.Cells(X, 4) = .Item(A).major
Sh.Cells(X, 5) = .Item(A).minor
Sh.Cells(X, 6) = .Item(A).fullpath
X = X + 1
Next
End With
.Range("A1").CurrentRegion.EntireColumn.AutoFit
End With
End Sub
'------------------------------------------