PC Review


Reply
Thread Tools Rate Thread

ADODB.Connection Error

 
 
=?Utf-8?B?TWlrZSBILg==?=
Guest
Posts: n/a
 
      7th Aug 2007
I get this error, "Compile Error: User-defined type not defined"
when I try to execute this line of code:

Dim cn As ADODB.Connection, rs As ADODB.Recordset, r As Long

I copied this code line from a previous thread that was talking about
loading data from excel to access. Any ideas what this error is and how to
solve it?
(The first part of the line seems to be where the error comes from. )
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      7th Aug 2007
You need to add a reference to Microsoft ActiveX Data Objects Library 2.?

In the VBE Select Tools -> References -> Microsoft ActiveX Data Objects
Library 2.?
--
HTH...

Jim Thomlinson


"Mike H." wrote:

> I get this error, "Compile Error: User-defined type not defined"
> when I try to execute this line of code:
>
> Dim cn As ADODB.Connection, rs As ADODB.Recordset, r As Long
>
> I copied this code line from a previous thread that was talking about
> loading data from excel to access. Any ideas what this error is and how to
> solve it?
> (The first part of the line seems to be where the error comes from. )

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error trapping for ADODB.Connection nod Microsoft Access Form Coding 1 31st Oct 2007 01:29 PM
ADODB connection error =?Utf-8?B?UGFvbGE=?= Microsoft Access 0 20th May 2006 09:50 AM
compile error... ADODB connection ina Microsoft Excel Programming 2 18th Apr 2006 05:41 PM
ADODB.Connection error '800a0e7c' PJ Microsoft ASP .NET 1 30th Oct 2003 01:27 PM
ADODB.Connection error '800a0e7c' PJ Microsoft Frontpage 2 29th Oct 2003 08:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:05 AM.