Microsoft.Jet.OLEDB.4.0 - Provider can not be found or it may not be installed
Asked Answered
F

1

10

I have created an Excel Macro in which I have used Microsoft.Jet.OLEDB.4.0 to fire query on Excel work sheets.

It's working perfect on my machine but my client is facing issue with it. (see the attached screen print)

Client is getting this error

References I have added in the program

Here are 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: It is must for me to make the code working in "Windows 7"

Femme answered 19/9, 2012 at 13:0 Comment(9)
Anybody please make the images working. I have attached 2 images but it's not getting displayed here.Femme
is your machine 32bit and the client machine 64bit? what is the os and the excel versions on your machine and your client machine?Eponym
Don't know about client's version. But I have tested that macro on both 32 & 64 bit windows 7 and it's working fine on both.Femme
if the screen shot is from client. Then the theme looks like windows vista. unless we know the client os and the office version it is difficult to suggest you a solution. you need to ask your client for these information.Eponym
@Esen: I asked him and he told that he is using Windows 7. Observe the Task Bar. Height of task bar is not that big in Vista. So it's Win7 only I think. By Excel version what do u mean? 2010/2007 or do u mean 64 bit/32 bit?Femme
If you had used early binding then you would see the missing reference in the References dialogGuarani
@esen : He has windows 7 and office 2010. And both are 64 bit. I confirmed againFemme
@Guarani How can I achieve early binding? Can you please tell me?Femme
Try this article - support.microsoft.com/kb/245115Guarani
K
15

The provider will fail like that on Window 7 Office x64 as the provider isn't supported on that platform.

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

Kike answered 19/9, 2012 at 13:11 Comment(4)
Thank you Alex. I will tell him to install the same & will send you the updated code.Femme
My answer was poorly stated, it will fail on 64bit office but work on 32 bit office on x64 windowsKike
hey it's still not working in client's PC. Can you please figure out what can be the reason?Femme
I never would have thought in August 2021 I'd still be dealing with 32 bit software! This answer more so proved my hypothesis and I think fixed it but it's not my tool to fix at work. Thank you!Inconceivable

© 2022 - 2024 — McMap. All rights reserved.