problems connection object

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Problems with the Connection Object

Problems with the Connection Object

resolvedResolved · Urgent Priority · Version 2003

Rob has attended:
Excel VBA Advanced course

Problems with the Connection Object

After a recent course attended with Stephen Williams, I have used some of the script to connect to an access data table. I have now tested the connection in a .udl notepad/GUI tool and it works. However when I apply the 'GetData' sub which accesses the database via the .Connection oblect I get a error which reads: 'Comile error: User-defined type not defined'...with the .Connection part of the code being highlighted...

I suspect that I need to activate a reference library which responds to this object...can you please tell me which reference library I should activate?

I have already activated the following...
Visual Basic for Applications
Microsoft 11.0 Object Library
OLE Automation
Microsoft Office 11.0 Object Library
Microsoft DAO 3.6 Object Library
Microsoft SQL Parser Object Library 1.0

Regards

Rob Snelson
attended 13&14 Aug course in London

RE: Problems with the Connection Object

I have resolved this issue thanks...the object library uses the full name for ADO namely Microsoft ActiveX Data Objects 2.8 Library.

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Apply Autosum with keyboard shortcut

If you press Alt and = at the same time, it applies autosum.

View all Excel hints and tips


Server loaded in 0.08 secs.