Solved

VBA: Class does not support Automation or doesn or support expected interface

Posted on 2011-09-08
10
1,348 Views
Last Modified: 2012-05-12
When running my VBA in Excel 2007 on a second machine, I get the following error:

Run-time error '430'
"Class does not support Automation or doesn or support expected interface"

When I click Debug, the cursor goes to thie line:

Set MyDatabase = New ADODB.Connection


I must have installed something onto my machine to get it to work, or there is some other configuration difference between my machine (where it works) and the other machine.

Any ideas?

Thanks.
0
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 5

Expert Comment

by:slycoder
ID: 36506948
At first thought - I would suggest check MS Office Service Pack versions or Office Updates.

Thanks
0
 
LVL 6

Expert Comment

by:reitzen
ID: 36508322
In the VBA editor, select Tools > References and compare your machine to the machine where you're getting the error.
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 36509779
Did you build it on a Win7 machine with SP1 applied?
0
Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

Author Comment

by:newbieweb
ID: 36510035
> Did you build it on a Win7 machine with SP1 applied?

Yes. BUT I founf the machine that's failing DOES NOT have SP1 for Windows 7.

> I would suggest check MS Office Service Pack versions or Office Updates.

How do I find the Office Service Pack level? It used to be as easy as Help->About in Word. But with 2007 they have hidden that feature :(
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 36510089
Exactly. It's a problem with SP1 - ADO code will only then work on another machine if it has SP1 installed. See this MSKB article: http://support.microsoft.com/kb/2517589

Regards,
Rory
0
 

Author Comment

by:newbieweb
ID: 36510166
Thanks. How will this work do on XP?

And should it get compiled on XP? Will that "solve" the SP1 problem on Windows 7?
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 36510202
Did you read the article?
0
 

Author Comment

by:newbieweb
ID: 36510278
Also, I was reminded that VBA is interpreted. Does this change your opinion about W7 SP1 being the cause of this error?
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 36510297
No, it doesn't. I take it from that that you have not read the article (since it explicitly mentions VBA).
0
 

Author Closing Comment

by:newbieweb
ID: 36510341
Thanks!
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question