ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I add a reference to an object library using VBA? (https://www.excelbanter.com/excel-programming/318748-how-do-i-add-reference-object-library-using-vba.html)

GPDynamics

How do I add a reference to an object library using VBA?
 
Does anyone have code to do the above?

I would like to distribute an Excel application referencing the Outlook
Object Library. However, because they might have different versions of
Outlook I need to be able to load whichever is applicable to their PC.

THANKS.

Bob Phillips[_6_]

How do I add a reference to an object library using VBA?
 
Use late binding, it is simpler. There is an example of doing this at
http://www.xldynamic.com/source/xld.EarlyLate.html

--

HTH

RP
(remove nothere from the email address if mailing direct)


"GPDynamics" wrote in message
...
Does anyone have code to do the above?

I would like to distribute an Excel application referencing the Outlook
Object Library. However, because they might have different versions of
Outlook I need to be able to load whichever is applicable to their PC.

THANKS.





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

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