VBA Access ADOX.Catalog, Object Library
If you are going to be working with the ADODX.Catalog object there are 2 options.
- Early binding
- Late binding
In the first method we add reference to the ADOX (Microsoft ADO Ext for DDL and Security) Object Library, before execution. It will run faster and we will have access to the VBA editor intellisense. On the other hand there is always the risk of compatibility issues arising when the program is run on a computer with a different version of the library installed. For more information about early vs late binding please see the link below:
Early Binding:
In this method you must add reference to the Microsoft ADO Ext for DDL and Security Object Library.
Step 1:
Step 2:
Locate the Microsoft ADO Ext for DDL and Security Object Library and select it:
Note: The version installed on my computer might be different than the version installed on the computer you are using. This shouldn’t cause a problem.
Defining a ADODX.Catalog object and initiating it can be done using the code below:
Dim objCatalog As ADOX.Catalog
set objCatalog = new ADOX.Catalog
Method 2, Late Binding:
In this method we don’t need to add a reference to the object library. The ADODX.Catalog object is declared as a general object and intiated as shown below:
Dim objCatalog As Object
Set objCatalog = CreateObject("ADOX.Catalog")
See also:
If you need assistance with your code, or you are looking for a VBA programmer to hire feel free to contact me. Also please visit my website www.software-solutions-online.com