Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like a macro un unselect a library reference. I have the following
code to set a reference, but I am curious as to how I would use a macro to un-set a library. Thanks! This will set a reference to ADO: Sub AddADO() Dim r For Each r In ThisWorkbook.VBProject.References If r.GUID = "{00000205-0000-0010-8000-00AA006D2EA4}" And r.Major = 2 Then Exit Sub End If Next On Error GoTo NOTFOUND 'although usually the ADO version will be higher, doing Minor:=0 will install 'the higher version if available. On the other hand when you specify Minor:=5 'and only a lower version is available, this can't be installed '---------------------------------------------------------------------------- ThisWorkbook.VBProject.References.AddFromGuid _ GUID:="{00000205-0000-0010-8000-00AA006D2EA4}", _ Major:=2, Minor:=0 Exit Sub NOTFOUND: On Error GoTo 0 End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to stop Option Button unselecting one on different worksheet? | Excel Discussion (Misc queries) | |||
unselecting not working anymore? | Excel Discussion (Misc queries) | |||
Selecting / UnSelecting sheets | Excel Discussion (Misc queries) | |||
Row reference increment but preserve column reference | Excel Worksheet Functions | |||
Unselecting a Cell?? | Excel Programming |