Reference... AddFromGuid
Good morning everyone,
For my project, the user must add from the Tools -Reference the "Microsoft ActiveX Data Objects 2.0 Library" in the VBA window. This is what was given to me.... However, it adds the "Microsoft Forms 2.0 Object Library". Anyone would know which one is the good one? Or where I could find the info? ThisWorkbook.VBProject.References.AddFromGuid _ GUID:="{0D452EE1-E08F-101A-852E-02608C4D0BB4}", major:=2, minor:=0 Thank you for your time Denys |
Reference... AddFromGuid
Found it....
Thanks Denys On Oct 23, 8:14 am, Denys wrote: Good morning everyone, For my project, the user must add from the Tools -Reference the "Microsoft ActiveX Data Objects 2.0 Library" in the VBA window. This is what was given to me.... However, it adds the "Microsoft Forms 2.0 Object Library". Anyone would know which one is the good one? Or where I could find the info? ThisWorkbook.VBProject.References.AddFromGuid _ GUID:="{0D452EE1-E08F-101A-852E-02608C4D0BB4}", major:=2, minor:=0 Thank you for your time Denys |
Reference... AddFromGuid
Manually add the appropriate reference, then -
With ThisWorkbook.VBProject.References("ADODB") Debug.Print .Description ' Microsoft ActiveX Data Objects 2.0 Library Debug.Print .Name, .major, .minor ' ADODB 2 0 Debug.Print .Fullpath ' path\msado20.tlb Debug.Print .GUID ' {00000200-0000-0010-8000-00AA006D2EA4} End With Somewhere in this ng RB Smissaert posted a routine to add the latest ADODB version available in user's system, might be worth a search. The respective GUID's are not the same for later versions. Regards, Peter T "Denys" wrote in message oups.com... Good morning everyone, For my project, the user must add from the Tools -Reference the "Microsoft ActiveX Data Objects 2.0 Library" in the VBA window. This is what was given to me.... However, it adds the "Microsoft Forms 2.0 Object Library". Anyone would know which one is the good one? Or where I could find the info? ThisWorkbook.VBProject.References.AddFromGuid _ GUID:="{0D452EE1-E08F-101A-852E-02608C4D0BB4}", major:=2, minor:=0 Thank you for your time Denys |
All times are GMT +1. The time now is 10:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com