Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Code 1 adds the ADO 2.6 Library fine. Can someone tell me how code 2 should
read to remove the ADO 2.6 Library? I found CODE 2 as example on web, but wasn't sure how it could be changed. CODE 1 Application.VBE.ActiveVBProject.References.AddFrom File _ "C:\Program Files\Common Files\System\ado\msado26.tlb" CODE 2 Set x = Application.VBE.ActiveVBProject _ .References.Item("Project2") Application.VBE.ActiveVBProject.References.Remove x |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"scott" wrote in message
... Code 1 adds the ADO 2.6 Library fine. Can someone tell me how code 2 should read to remove the ADO 2.6 Library? I found CODE 2 as example on web, but wasn't sure how it could be changed. CODE 1 Application.VBE.ActiveVBProject.References.AddFrom File _ "C:\Program Files\Common Files\System\ado\msado26.tlb" CODE 2 Set x = Application.VBE.ActiveVBProject _ .References.Item("Project2") Application.VBE.ActiveVBProject.References.Remove x Hi Scott, Here's one way to do it: Sub RemoveReference() Dim x As Object Set x = Application.VBE.ActiveVBProject _ .References.Item("ADODB") Application.VBE.ActiveVBProject.References.Remove x End Sub -- Rob Bovey, Excel MVP Application Professionals http://www.appspro.com/ * Take your Excel development skills to the next level. * Professional Excel Development http://www.appspro.com/Books/Books.htm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I remove a reference from a cell? | Excel Discussion (Misc queries) | |||
Remove reference from code | Excel Programming | |||
Remove reference names | Excel Programming | |||
Add Remove DLL reference in VB | Excel Programming | |||
Remove a reference | Excel Programming |