- Joined
- Feb 8, 2002
- Messages
- 3,391
- Office Version
- 365
- Platform
- Windows
From Excel VBA, I am trying to create a table in an existing Access database.
I had been using ADO in the project. The only MSDN articles I could find on creating a table used ADOX. In Excel 2002, I added a reference to the Microsoft ADO Ext 2.7 library, and the code works. This is code that creates a new ADOX.Catalog, defines a new ADOX.Table, then does cat.Tables.Append.
When I try to run this on Excel 2000, it does not work. The reference to ADO Ext 2.7 is missing. The same DLL is there, but it is an older version. I tried copying the new DLL over the old DLL, but that does not work.
I've got to believe there had to be a way before Excel 2002 to create a table in an Access database programatically.
I've found documentation on how to do this with DAO. Is there any hassle (other than increased overhead) in having 98% of the project use ADO, but this one-time call to create the table use DAO?
Any suggestions greatly appreciated.
Bill
I had been using ADO in the project. The only MSDN articles I could find on creating a table used ADOX. In Excel 2002, I added a reference to the Microsoft ADO Ext 2.7 library, and the code works. This is code that creates a new ADOX.Catalog, defines a new ADOX.Table, then does cat.Tables.Append.
When I try to run this on Excel 2000, it does not work. The reference to ADO Ext 2.7 is missing. The same DLL is there, but it is an older version. I tried copying the new DLL over the old DLL, but that does not work.
I've got to believe there had to be a way before Excel 2002 to create a table in an Access database programatically.
I've found documentation on how to do this with DAO. Is there any hassle (other than increased overhead) in having 98% of the project use ADO, but this one-time call to create the table use DAO?
Any suggestions greatly appreciated.
Bill