![]() 'Returns true/false if a specified reference exists, based on LIKE comparisonįor Each ref In The sub above calls on this custom function, which first iterates the active References Function PPT_RefExists(refPath As String, refDescrip As String) As Boolean If Not PPT_RefExists(ADODBReference, "Microsoft ActiveX Data Objects 6.0 Library") ThenĪ.AddFromFile _ 'ADODBReference is a public const refers to Microsoft ActiveX Data Objects 6.0 Library ![]() 'Adds a programmatic reference to ADODB library if one doesn't already exist ![]() Public Const ADODBReference As String = "C:\Program Files (x86)\Common Files\System\ado\msado15.dll" Or you could add another constant and a logic check to see what Application.Version and load from the appropriate destination path. ![]() You may need to change the ADODBReference constant for use in XP. I suggest above to use late binding, but you could do something like this (my code exactly as used in PPT 2010, should be easy enough to adapt to Access but I do not ever use access). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |