Solved

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

Posted on 2011-09-08
10
1,289 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

This article will show you how to use shortcut menus in the Access run-time environment.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

786 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