I have been working on this problem a few years now (or so it feels) and haven't found a solution to it yet.
My problem is this:
I have an Excel spreadsheet that I plan to send out for testing and later for distributing to users with unknown configurations. I need a kind of checking references routine that searches through existing references and disables the references which are missing (also enables them later if they get installed at some later point). I thought the code I already had for this would do the trick (attached), but apparently our tester is getting the "Cannot find project or library." error when he runs it.
Any help appreciated,
Private Sub LibCheck() ' Source: MSDN
Dim vbProj As VBProject ' This refers to your VBA project.
Dim chkRef As Reference ' A reference.
' Refer to the activedocument's VBA project.
Set vbProj = Application.ActiveWorkbook.VBProject
' Check through the selected references in the References dialog box.
For Each chkRef In vbProj.References
If (chkRef.IsBroken) Then
' Remove the reference from the reference list