How to set References Programmatically?

  • Thread starter Thread starter Frederick Wilson
  • Start date Start date
F

Frederick Wilson

Hello all,

Through the years that I have been reading here, I have read and used
the solution of reseting references so functions in code work. If one
were to distribute an application how can you programmatically check
that all required references are set?

I have no real need for it, just curious.

Thanks,
Fred
 
To check that there aren't any problems with your References, use code like:

Sub ReferenceProperties()
Dim ref As Reference

For Each ref In References
If ref.IsBroken = False Then
Debug.Print "Name: ", ref.Name
Debug.Print "FullPath: ", ref.FullPath
Debug.Print "Version: ", ref.Major & "." & ref.Minor
Else
Debug.Print "GUIDs of broken references:"
Debug.Print ref.GUID
EndIf
Next ref

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top