+ Reply to Thread
Results 1 to 2 of 2

Programatic Reference to Libraries

  1. #1
    Wayne S.
    Guest

    Programatic Reference to Libraries

    Is it possible to set a reference to a library programmatically like I
    can do for an add-in?

    Thanks in advance for any help.




  2. #2
    Chip Pearson
    Guest

    Re: Programatic Reference to Libraries

    Yes. If you know the name of the library file, you can use code
    like the following:

    ThisWorkbook.VBProject.References.AddFromFile _
    Filename:="H:\whatever\typelib.olb"

    If the typelib has been registered, and you know the GUID and
    version numbers, you can use code like

    ThisWorkbook.VBProject.References.AddFromGuid _
    GUID:="{ whatever }", Major:=x, Minor:=y


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com




    "Wayne S." <Wayne [email protected]> wrote in message
    news:[email protected]...
    > Is it possible to set a reference to a library programmatically
    > like I
    > can do for an add-in?
    >
    > Thanks in advance for any help.
    >
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1