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

Retrieving MDAC version with VBA

Status
Not open for further replies.

Glohamar

Programmer
Sep 3, 2003
248
US
Does anyone know if you can get the MDAC and ADO versions of a users pc with VBA code? It seems that every user has something different on their machine (company not good at those types of updates).

Thanks for any help

Dave
 
I found it. Didn't have my head on straight.

Dave
 
*You need a reference to the MicrosoftScriptingRuntime library for FileSystem Object
[tt]
Public Const MDAC_FILE As String = "c:\program files\common files\system\ado\MSADOMD.DLL"

Public Function GetMDACVersion() As String
On Error Resume Next

Dim FSO As New FileSystemObject
Dim File As File

GetMDACVersion = "MDAC Version: " & CStr(FSO.GetFileVersion(MDAC_FILE))

Set File = Nothing
Set FSO = Nothing

End Function 'GetMDACVersion[/tt]

Turn your headache into my project!
Jeffrey R. Roberts
Insight Data Consulting
Access and SQL Server Development
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top