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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Verify Reference Library Exists 1

Status
Not open for further replies.

mmogul

IS-IT--Management
Dec 1, 2003
218
US
I'm looking for a way to test if the Microsoft DAO 3.6 Object Library has been referenced in a database. We have a number of distributed databases and some new code requires this library to be active.

Secondly, if the library is not active, is there a way to activate it programmatically?

Thanks.
 
A few notes:

Code:
   For Each ref In Application.References
      Debug.Print
      Debug.Print ref.Name
      Debug.Print "Version " & ref.Major & "." & ref.Minor
      If ref.Guid <> "" Then Debug.Print "Guid = "; ref.Guid
      Debug.Print ref.FullPath
   Next

Application.References.AddFromFile "C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll"
End Sub
 
Perfect - thanks. You earned a gold star!
 
Howdy all,

When I run the code provided above by Remou, or any procedure using the "Fullpath" method, I get an error saying "Method 'Fullpath' of Object 'Reference' failed."

I'm assuming this is a dll issue. Can anyone tell me which dll might be the culprit, and if there is an elegant fix to this?

Thanks,
Mike
 
Hi mguidry5
It is much better to start a new thread, you will get more answers and mmogul will not be bothered by unwanted posts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top