• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1594
  • Last Modified:

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

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
newbieweb
Asked:
newbieweb
1 Solution
 
slycoderCommented:
At first thought - I would suggest check MS Office Service Pack versions or Office Updates.

Thanks
0
 
reitzenCommented:
In the VBA editor, select Tools > References and compare your machine to the machine where you're getting the error.
0
 
Rory ArchibaldCommented:
Did you build it on a Win7 machine with SP1 applied?
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
newbiewebSr. Software EngineerAuthor Commented:
> 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
 
Rory ArchibaldCommented:
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
 
newbiewebSr. Software EngineerAuthor Commented:
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
 
Rory ArchibaldCommented:
Did you read the article?
0
 
newbiewebSr. Software EngineerAuthor Commented:
Also, I was reminded that VBA is interpreted. Does this change your opinion about W7 SP1 being the cause of this error?
0
 
Rory ArchibaldCommented:
No, it doesn't. I take it from that that you have not read the article (since it explicitly mentions VBA).
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now