LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Programatic Reference to Libraries

Chip,

MUST the TypeLib be registered? (I'm assuming not but would like to verify)
Also, if applying this technique to MS Access, should the code be put into a
Class Module or does it not matter?

Further, if a component can be placed in a subfolder and referenced in code,
is there much of a performance improvement to write an installer or otherwise
get the component registered? Recognizing deployment is to varied
environments and versions.

Thank you very much.

Allen B.

"Chip Pearson" wrote:

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 wrote in message
...
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.






 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reference Libraries and Add-Ins Rich Excel Discussion (Misc queries) 3 June 26th 09 10:13 PM
Importing libraries Roro Excel Discussion (Misc queries) 0 April 7th 06 01:31 PM
Reference Libraries ben Excel Programming 9 March 23rd 05 10:24 PM
Programatic Data Validation Jdibble Excel Programming 2 May 2nd 04 08:28 PM
Urgent!!! -- Reference libraries Michelle Excel Programming 3 September 30th 03 02:07 AM


All times are GMT +1. The time now is 03:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"