Gustav Brock
Gustav at cactus.dk
Wed May 27 02:30:27 CDT 2009
Hi William
Go to Tools, References and note that the top two can't me unmarked - native to ("built in") Access, can't be removed.
The OLE reference may often be deselected.
The remaining two, DAO, ADODB, you probably use in your code. If you don't know, unmark each and compile and you will see.
You may expand your code a bit:
For Each chkref In Application.References
strLog = strLog & IIf(chkref.IsBroken, "## Broken Reference ", "OK ") & chkref.BuiltIn & " ref: " & chkref.Name _
& " " & chkref.Major & "." & chkref.Minor & " " & chkref.FullPath & vbNewLine
Next
Note too, that this only lists the references, it doesn't actually verify them. How to do this has been discussed several times - I can find links should you wish that.
/gustav
>>> wdhindman at dejpolsystems.com 27-05-2009 07:58 >>>
Group
...I'm running the following code within a private sub in my startup form:
Dim chkref As Reference
For Each chkref In Application.References
strLog = strLog & IIf(chkref.IsBroken, "## Broken Reference", "OK") & " ref: " & chkref.Name _
& " " & chkref.Major & "." & chkref.Minor & " " & chkref.FullPath & vbNewLine
Next
...works like a charm ...except that the log reads as follows:
OK ref: VBA 4.0 C:\Program Files\Common Files\Microsoft
Shared\VBA\VBA6\VBE6.DLL
OK ref: Access 9.0 C:\Program Files\Microsoft Office\OFFICE11\MSACC.OLB
OK ref: DAO 5.0 C:\Progra~1\Common~1\Micros~1\dao\dao360.dll
OK ref: stdole 2.0 C:\WINDOWS\system32\stdole2.tlb
OK ref: ADODB 2.8 C:\Program Files\Common Files\System\ado\msado15.dll
...where the heck did the VBA 4.0/Access 9.0/DAO 5.0 come from?
William