I have an Excel 2007 file that will use ADODB connection to extract data from an Access (.accdb) database. It was created a couple years ago and was always working fine. Recently when I tried to modify it for a new project the OpenConnection part stopped working. I think that might be affected by our IT department reinstalling my Office 2007 products. The problem is I don't know which library I am missing to make it run:
The line of code that's causing the error is:
Code:
dim Conn As New ADODB.Connection
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & fileName & ";"
I have it bring up a dialog box for user to pick the .accdb file they want to use. Now if they select the file, I will get the "Run-time error 3706 - Provider cannot be found. It may not be properly installed."
These are the libraries I've selected:
* Visual Basic For Applications
* Microsoft Access 12.0 Object Library
* Microsoft Excel 12.0 Object Library
* Microsoft Office 12.0 Object Library
* Microsoft Forms 2.0 Object Library
* Microsoft ADO Ext. 2.8 for DDL and Security
* Microsoft ActiveX Data Objects 2.8 Library
* Microsoft ActiveX Data Recordset 2.8 Library
* Microsoft OLE DB provider for OLAP service connection dialog 8.0
* OLE Automation
* Microsoft Data Access Components Installed Version (MDAC)
Now this last one (MDAC) I've read about that I should reall have v2.8 installed. I cannot tell if i'm having the right one. Does anybody know what library I'm still missing?
Thanks a lot!