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.
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.
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 S.@discussions.microsoft.com> wrote in message
news:0A649A07-0E11-4D35-9B43-DC2EEE3AEB43@microsoft.com...
> 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.
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks