Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 28th, 2006, 01:50 AM
Authorized User
 
Join Date: Jun 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

 
Old February 28th, 2006, 04:09 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 173
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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

 
Old March 26th, 2014, 03:44 PM
Registered User
 
Join Date: Mar 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Thank you

Thank you1





Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting variable to user defined type mantle51 SQL Server 2000 3 August 10th, 2007 03:52 AM
User-defined type as input for store procedures davidb BOOK: Professional Java Development with the Spring Framework 0 August 11th, 2005 02:49 PM
User-defined type not defined (Icecream.mdb) dloren01 BOOK: Beginning Access VBA 0 June 22nd, 2005 10:36 PM
Using a user defined type and the Split Function nikotromus Access VBA 2 August 20th, 2004 12:02 PM
Table and User Defined Type with same Name djuricd SQL Server 2000 3 April 20th, 2004 12:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.