p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Excel VBA (http://p2p.wrox.com/forumdisplay.php?f=79)
-   -   ADODB.Connection user-defined type not defined (http://p2p.wrox.com/showthread.php?t=39128)

Wall st Guru February 28th, 2006 01:50 AM

ADODB.Connection user-defined type not defined
 
When I type

Dim cnn As ADODB.Connection

to connect to another excel from within excel I get the error

user-defined type not defined

I would appreciate if someone could help me on this.

Thanks


maccas February 28th, 2006 04:09 AM

You need to set a reference to "Microsfot ActiveX Data Objects" (ADO for short) first.

In the VBE select Tools -> References... From the dialog box that pops up, scrolll down until you find an entry that reads something like Microsfot ActiveX Data Objects 2.7 Library (the number might be different - pick the highest number you can see). Check the tick box next to this entry and then click ok. You should be good to go now.

Maccas


ravineon March 26th, 2014 03:44 PM

Thank you
 
Thank you1


All times are GMT -4. The time now is 04:15 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.