Microsoft.Jet.OLEDB.4.0 - The provider could not be found or it could not be installed

I created an Excel macro in which I used Microsoft.Jet.OLEDB.4.0 to run a query on Excel worksheets.

It works fine on my machine, but my client is facing a problem. (see attached print on screen)

Client is getting this error

References I have added in the program

Here are the details for my connection object:

Dim cn
Set cn = CreateObject("ADODB.Connection")
With cn
    .Provider = "Microsoft.Jet.OLEDB.4.0"
    .ConnectionString = "Data Source=" & ThisWorkbook.FullName & "; Extended Properties=Excel 8.0"
    .Open
End With

Please note: I need to make code working in "Windows 7"

+5
source share
1 answer

The provider will not work as in Window 7 Office x64, since the provider is not supported on this platform.

You need to install x64 Microsoft Access Database Engine 2010 Redistributable and change the connection string toProvider=Microsoft.ACE.OLEDB.12.0

+10

All Articles