Verweise - ADO!

Alle gesetzten Verweise auslesen mit Beschreibung, Name, GUID und Pfad. Danach den Verweis auf "Microsoft ActiveX Data Objects 2.8 Library" setzen.

Verweise - ADO...

Code:
Option Explicit
Public Sub Read_Ref()
Dim objTMP As Object
Dim objRef As Object
Set objRef = ThisWorkbook.VBProject.References
For Each objTMP In objRef
With objTMP
Debug.Print .Description
Debug.Print .Name
Debug.Print .GUID
Debug.Print .fullpath
Debug.Print "NEXT REF"
End With
Next objTMP
End Sub
Public Sub Ref_ADO()
Dim objTMP As Object
On Error Resume Next
Set objTMP = ThisWorkbook.VBProject.References
'Microsoft ActiveX Data Objects 2.8 Library
objTMP.AddFromGuid _
"{2A75196C-D9EB-4129-B803-931327F72D5C}", 1, 0
End Sub
'Microsoft ActiveX Data Objects 2.8 Library
'{2A75196C-D9EB-4129-B803-931327F72D5C}

'Microsoft ADO Ext. 2.8 for DDL and Security
'{00000600-0000-0010-8000-00AA006D2EA4}

'Microsoft ActiveX Data Objects 6.0 Library
'{B691E011-1797-432E-907A-4D8C69339129}

'Microsoft ADO Ext. 6.0 for DDL and Security
'{00000600-0000-0010-8000-00AA006D2EA4}

Kommentare

Beliebte Posts aus diesem Blog

Formeln - auch Array - per VBA eintragen...

Alle Dateien eines Ordners - Optional mit Unterordner

Excel -> Word in Textmarken (Bookmarks)...