Can't Track down Error

  • Thread starter Thread starter CDM
  • Start date Start date
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.
 
Have you tried compiling the code? (It's under the Debug menu while in the
VB Editor). The line should be highlighted for you.
 
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"?
 
Yes, that's when the error message pops up. However, the code seems to run OK
even though the compile was unsuccessful.
 
That's very odd. I've never seen the compiler not indicate which line is
raising the error.
 
Back
Top