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

problems connection object

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

Problems with the Connection Object

ResolvedVersion 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:

Importing Numbers in Excel 2010

Occasionally, when importing data into Excel you find that the some of the imported values are treated as text.

To convert these numbers to actual values, click on an empty cell and press Ctrl+C.

Next, select the range that contains the values you need to change and in the Clipboard Group on the Home tab, click the Paste drop-down arrow and choose Paste Special. In the Paste Special dialog box, select Add and then click OK.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.