Can't Track down Error

C

CDM

I'm getting an error message that says:"User defined type not defined", but
it doesn't tell me what line in my code is causing it not to compile. Is
there a way to coax it out.
 
D

Douglas J. Steele

Have you tried compiling the code? (It's under the Debug menu while in the
VB Editor). The line should be highlighted for you.
 
J

John W. Vinson

I'm getting an error message that says:"User defined type not defined", but
it doesn't tell me what line in my code is causing it not to compile. Is
there a way to coax it out.

The most common source of this problem is a bad reference. Perhaps you're
Dim'ing something as a Database - the Database type exists in the DAO object
library but not in the ADO library (which was the default library for A2000
and A2002).

Open the VBA editor and select Tools... References. Are any marked "MISSING"?
 
C

CDM

Yes, that's when the error message pops up. However, the code seems to run OK
even though the compile was unsuccessful.
 
D

Douglas J. Steele

That's very odd. I've never seen the compiler not indicate which line is
raising the error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top