ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select reference via code (https://www.excelbanter.com/excel-programming/384517-select-reference-via-code.html)

Harley

Select reference via code
 
Is it possible to select a reference via code? Specifically, I'd like to
select "Microsoft Visual Basic for Applications Extensibility.

Tom Ogilvy

Select reference via code
 
http://support.microsoft.com/default...b;en-us;160647
XL97: How to Programmatically Create a Reference

http://support.microsoft.com/default...b;en-us;213529
XL2000: How to Programmatically Create a Reference

--
regards,
Tom Ogilvy


"Harley" wrote:

Is it possible to select a reference via code? Specifically, I'd like to
select "Microsoft Visual Basic for Applications Extensibility.


Chip Pearson

Select reference via code
 
Try something like

Sub AddVbIdeRef()
ThisWorkbook.VBProject.References.AddFromGuid _
GUID:="{0002E157-0000-0000-C000-000000000046}", _
major:=0, minor:=0

End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"Harley" wrote in message
...
Is it possible to select a reference via code? Specifically, I'd like to
select "Microsoft Visual Basic for Applications Extensibility.





All times are GMT +1. The time now is 03:00 PM.

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