|
| |||||||||
| Tags: activex, data, library, objects |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| Microsoft ActiveX Data Objects 2.0 Library
Hello everyone, Recently, I asked how to add the VBA in Excel. Is there a way to do it by VBA? (enable or disable a library reference in the vba?) When I try to add, I got the error : ThisWorkbook.VBProject.References.AddFromGuid _ GUID: = "(0D452EE1-E08F-101A-852E-02608C4D0BB4)", major: = 2, minor: = 0 What I need is: "Microsoft ActiveX Data Objects 2.0 Library" And I really do not know where to look for these info .. Someone not? Thank you very much |
|
#2
| ||||
| ||||
| Re: Microsoft ActiveX Data Objects 2.0 Library
On Error Resume Next ThisWorkbook.VBProject.References.AddFromGuid _ GUID: = "(00000200-0000-0010-8000-00AA006D2EA4)", major: = 2, minor: = 0 To find the name of the library 'ADODB' is added manually reference that are necessary in the window of the code editor/menu/tools/references/ In the Object Browser (F2 keyboard shortcut) in the drop-down list identified "all libraries" were the names of all libraries loaded. When a selection is added to the bottom of the window, some information that guide the user Library ADODB 'His name 'Location and the file responsible for the library C:\Program Files\Common Files\system\ado\msado20.tlb 'Descriptive name of the library as seen in the "References" Microsoft ActiveX Data Objects 2.0 Library And to find the parameters of the command line, the procedure is as follows: Code: Sub test () With ThisWorkbook.VBProject.References ( "ADODB") Range ( "A1"). Value =. GUIDs Range ( "A2"). Value =. Major Range ( "A3"). Value =. Minor End With End Sub |
|
#3
| ||||
| ||||
| Re: Microsoft ActiveX Data Objects 2.0 Library
Can you project in VBA (Alt F11) - menu Tools / References: Here you have all the references available - you get up and check your MICROSOFT ref. desired. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Microsoft ActiveX Data Objects 2.0 Library" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What are the PHP Data Objects? | Jacques25 | Software Development | 5 | 07-03-2010 05:13 AM |
| Microsoft remote desktop activex control | Indrani | Networking & Security | 3 | 31-07-2009 06:53 PM |
| C# using DAO (Data Access Objects) | Pragnya | Software Development | 2 | 09-06-2009 02:31 PM |
| ActiveX objects missing while playing game on MSN messenger | Yudhajit | Technology & Internet | 3 | 11-03-2009 12:52 AM |
| ActiveX Data Objects | fastrod | Software Development | 3 | 04-03-2009 12:53 PM |