PDA

View Full Version : [SOLVED] Compile Error



EricM
03-29-2005, 06:00 PM
I keep getting a compile error user defined type not defined

I have read over and over about dim in the excel help and cannot see what is wrong. It always seems to be a dim statement
Here is a copy of one such statement.


Dim cnt As ADODB.Connection

Jacob Hilderbrand
03-29-2005, 06:07 PM
You need to set a reference (Tools | References) to Microsoft ActiveX Data Objects #.# Library. #.# will be some number based on your application version. Just choose the highest numbered reference to add.

geekgirlau
03-29-2005, 06:08 PM
This object is not a default option for Excel code, so you need a reference to the ADODB object. In the VBA window, select Tools, References, "Microsoft ActiveX Data Objects Library" (there will be a version number there - use the latest version available).

Oops - beat me to it Jake!

Anne Troy
03-29-2005, 06:24 PM
Girl: I wrote you off. SO GLAD TO SEE YOU AGAIN!!! (seriously!!)
:cloud9:

geekgirlau
03-29-2005, 06:57 PM
Glad to be back - just bought a "renovator's delight" (aka dump) that is taking up most of my spare time :banghead: