Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Is it possible to add a VBA reference via VBA code. For example I will need to check when the spreadsheet open if ADO reference is setup, and if not set up to set it up. Thanks. Mark |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mark,
Try something like On Error Resume Next ThisWorkbook.VBProject.References.AddFromGuid _ GUID:="{B691E011-1797-432E-907A-4D8C69339129}", major:=0, minor:=0 See also www.cpearson.com/excel/vbe.htm -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting LLC www.cpearson.com (email on the web site) "mark" wrote in message ... Hi, Is it possible to add a VBA reference via VBA code. For example I will need to check when the spreadsheet open if ADO reference is setup, and if not set up to set it up. Thanks. Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select reference via code | Excel Programming | |||
Reference to Add-In for VBA code? | Excel Programming | |||
VBA code to set a reference | Excel Programming | |||
How to make a button VBA code reference other VBA code subroutines??? | Excel Programming | |||
Hard Code DLL Reference in VBA | Excel Programming |