Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting if Library Reference is Missing 1

Status
Not open for further replies.

OzzieOwl

Technical User
Dec 13, 2001
45
0
0
GB
Hi

I have some VBA code that references Crystal Reports 8 Library, some users are running older versions of Crystal Reports, and some are running newer versions of Crystal Reports, so I need to detect if a Reference for Crystal Reports 8 Library is MISSING or not so I can disable the routine if it is missing, does anyone know how to do this using VBA.

Thanks in advance

Ozzie Owl

 
Something like this ?
With Application.VBE.ActiveVBProject
For i = 1 To .References.Count
If .References(i).IsBroken Then
Debug.Print "Missing " & .References(i).Name
End If
Next i
End With
You may take a look at References.AddFromFile and .AddFromGUID methods

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top