Get a list of installed References

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
1,958
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
I'd like to get list of references in use, so if any are missing I can advise the user.

Is there any way of doing this (without needing a reference that may be missing) ?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Rich (BB code):
Sub ListReferences()
Dim vbRef  As Object, X As Long
X = 1
Range("A1:E1").Value = Array("NAME", "DESCRIPTION", "GUID", "IS MISSING?", "FULL PATH")
For Each vbRef In ThisWorkbook.VBProject.References
    Range("A1").Offset(X, 0).Value = vbRef.Name
    Range("A1").Offset(X, 1).Value = vbRef.Description
    Range("A1").Offset(X, 2).Value = vbRef.GUID
    Range("A1").Offset(X, 3).Value = vbRef.IsBroken
    Range("A1").Offset(X, 4).Value = vbRef.FullPath
    X = X + 1
Next vbRef
End Sub
 
Upvote 0
Thanks for that, but can you modify it for Access? I had a go but the line with "ThisWorkbook" foiled me.
 
Upvote 0

Forum statistics

Threads
1,221,888
Messages
6,162,623
Members
451,778
Latest member
ragananthony7911

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top