Solved

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

Posted on 2011-09-08
10
1,251 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
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
 

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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Excel VBA - copying formats 7 22
Excel 6 19
Office 365 vs. In-House 4 37
How to calculate time in/out/paused, resumed? 4 30
This article will show you how to use shortcut menus in the Access run-time environment.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now