ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Addin / Library Reference question (https://www.excelbanter.com/excel-programming/310340-addin-library-reference-question.html)

Stuart[_5_]

Addin / Library Reference question
 
Say an addin requires one or more References to be set.
When distributing the addin to a new user, can those
References be set programmatically within the addin's
code, please?

Regards


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 17/09/2004



Chip Pearson

Addin / Library Reference question
 
Stuart,

You would have to know the exact file name or the GUID of library
you wish to reference. If you do, then you can use code like

ThisWorkbook.VBProject.References.AddFromFile "full file name"
' or
ThisWorkbook.VBProject.References.AddFromGuid "guid", Major,
Minor


This should be in the Auto_Open procedure of the add-in, in a
module that does not use any objects defined in the library to
which you are adding the reference.

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




"Stuart" wrote in message
...
Say an addin requires one or more References to be set.
When distributing the addin to a new user, can those
References be set programmatically within the addin's
code, please?

Regards


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date:
17/09/2004





Stuart[_5_]

Addin / Library Reference question
 
Many thanks.
Can you explain further for me please?

Say addin is developed under Excel2000 and being geared
for an Excel2000 or 2003 user.

Say the addin has code requiring a Reference to be set to
Microsoft Visual Basic for Applications Extensibility 5.3
(as in Excel2000).

Can you show me how to obtain the information I need
for the code (assuming I can access an Excel2003 machine)
please?

Regards and thanks.


"Chip Pearson" wrote in message
...
Stuart,

You would have to know the exact file name or the GUID of library
you wish to reference. If you do, then you can use code like

ThisWorkbook.VBProject.References.AddFromFile "full file name"
' or
ThisWorkbook.VBProject.References.AddFromGuid "guid", Major,
Minor


This should be in the Auto_Open procedure of the add-in, in a
module that does not use any objects defined in the library to
which you are adding the reference.

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




"Stuart" wrote in message
...
Say an addin requires one or more References to be set.
When distributing the addin to a new user, can those
References be set programmatically within the addin's
code, please?

Regards


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date:
17/09/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 17/09/2004



Chip Pearson

Addin / Library Reference question
 
Stuart,

The following will add a reference to the Extensibility 5.3
library.


ThisWorkbook.VBProject.References.AddFromGuid _
GUID:="{0002E157-0000-0000-C000-000000000046}", _
Major:=5, Minor:=3



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




"Stuart" wrote in message
...
Many thanks.
Can you explain further for me please?

Say addin is developed under Excel2000 and being geared
for an Excel2000 or 2003 user.

Say the addin has code requiring a Reference to be set to
Microsoft Visual Basic for Applications Extensibility 5.3
(as in Excel2000).

Can you show me how to obtain the information I need
for the code (assuming I can access an Excel2003 machine)
please?

Regards and thanks.


"Chip Pearson" wrote in message
...
Stuart,

You would have to know the exact file name or the GUID of
library
you wish to reference. If you do, then you can use code like

ThisWorkbook.VBProject.References.AddFromFile "full file name"
' or
ThisWorkbook.VBProject.References.AddFromGuid "guid", Major,
Minor


This should be in the Auto_Open procedure of the add-in, in a
module that does not use any objects defined in the library to
which you are adding the reference.

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




"Stuart" wrote in message
...
Say an addin requires one or more References to be set.
When distributing the addin to a new user, can those
References be set programmatically within the addin's
code, please?

Regards


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date:
17/09/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date:
17/09/2004





Stuart[_5_]

Addin / Library Reference question
 
Many Thanks,

Regards.

"Chip Pearson" wrote in message
...
Stuart,

The following will add a reference to the Extensibility 5.3
library.


ThisWorkbook.VBProject.References.AddFromGuid _
GUID:="{0002E157-0000-0000-C000-000000000046}", _
Major:=5, Minor:=3



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




"Stuart" wrote in message
...
Many thanks.
Can you explain further for me please?

Say addin is developed under Excel2000 and being geared
for an Excel2000 or 2003 user.

Say the addin has code requiring a Reference to be set to
Microsoft Visual Basic for Applications Extensibility 5.3
(as in Excel2000).

Can you show me how to obtain the information I need
for the code (assuming I can access an Excel2003 machine)
please?

Regards and thanks.


"Chip Pearson" wrote in message
...
Stuart,

You would have to know the exact file name or the GUID of
library
you wish to reference. If you do, then you can use code like

ThisWorkbook.VBProject.References.AddFromFile "full file name"
' or
ThisWorkbook.VBProject.References.AddFromGuid "guid", Major,
Minor


This should be in the Auto_Open procedure of the add-in, in a
module that does not use any objects defined in the library to
which you are adding the reference.

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




"Stuart" wrote in message
...
Say an addin requires one or more References to be set.
When distributing the addin to a new user, can those
References be set programmatically within the addin's
code, please?

Regards


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date:
17/09/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date:
17/09/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 17/09/2004



Ivan F Moala[_3_]

Addin / Library Reference question
 
Hi Stuart

Have a lok @ this thread which explains how to get these

http://www.mrexcel.com/board2/viewtopic.php?t=8251

"Stuart" wrote in message ...
Many thanks.
Can you explain further for me please?

Say addin is developed under Excel2000 and being geared
for an Excel2000 or 2003 user.

Say the addin has code requiring a Reference to be set to
Microsoft Visual Basic for Applications Extensibility 5.3
(as in Excel2000).

Can you show me how to obtain the information I need
for the code (assuming I can access an Excel2003 machine)
please?

Regards and thanks.


"Chip Pearson" wrote in message
...
Stuart,

You would have to know the exact file name or the GUID of library
you wish to reference. If you do, then you can use code like

ThisWorkbook.VBProject.References.AddFromFile "full file name"
' or
ThisWorkbook.VBProject.References.AddFromGuid "guid", Major,
Minor


This should be in the Auto_Open procedure of the add-in, in a
module that does not use any objects defined in the library to
which you are adding the reference.

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




"Stuart" wrote in message
...
Say an addin requires one or more References to be set.
When distributing the addin to a new user, can those
References be set programmatically within the addin's
code, please?

Regards


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date:
17/09/2004






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 17/09/2004



All times are GMT +1. The time now is 10:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com