Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default ADODB.Connection Error

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. )
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default ADODB.Connection Error

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB Connection fi.or.jp.de Excel Worksheet Functions 0 September 9th 09 09:23 PM
compile error ADODB connection setup ToniS Excel Programming 1 July 28th 07 12:00 AM
ADODB.Connection Bogdan Excel Programming 7 July 16th 07 03:42 PM
ADODB.Connection Jez[_7_] Excel Programming 0 October 13th 06 12:02 PM
compile error... ADODB connection ina Excel Programming 2 April 18th 06 05:41 PM


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"