Results 1 to 3 of 3

Thread: Microsoft ActiveX Data Objects 2.0 Library

  1. #1
    Join Date
    Dec 2007
    Posts
    263

    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. #2
    Join Date
    May 2008
    Posts
    209

    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. #3
    Join Date
    May 2008
    Posts
    256

    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.

Similar Threads

  1. What are the PHP Data Objects?
    By Jacques25 in forum Software Development
    Replies: 5
    Last Post: 07-03-2010, 05:13 AM
  2. Microsoft remote desktop activex control
    By Indrani in forum Networking & Security
    Replies: 3
    Last Post: 31-07-2009, 05:53 PM
  3. C# using DAO (Data Access Objects)
    By Pragnya in forum Software Development
    Replies: 2
    Last Post: 09-06-2009, 01:31 PM
  4. ActiveX objects missing while playing game on MSN messenger
    By Yudhajit in forum Technology & Internet
    Replies: 3
    Last Post: 10-03-2009, 11:52 PM
  5. ActiveX Data Objects
    By fastrod in forum Software Development
    Replies: 3
    Last Post: 04-03-2009, 12:53 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,166,466.86168 seconds with 16 queries