Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vb6 user-defined type not defined error on full compile

Tags:

vb6

I have some vb6 code I have not compiled in a long time. The last compile is in production. Now I get an error "User-defined type is not defined" when I do a full compile. I'm sure there is a reference missing. But there is no code that is hi-lighted. And I cannot seem to find what reference might be lost.

Any clues as to what I can do to find the missing reference would be very helpful.

Thanks!

Dave

like image 599
An Old Guy and His Dog Avatar asked Jun 25 '12 23:06

An Old Guy and His Dog


People also ask

What does it mean user defined type not defined?

This error has the following causes and solutions: You tried to declare a variable or argument with an undefined data type or you specified an unknown class or object. Use the Type statement in a module to define a new data type.


1 Answers

I've had that happen before it drove me crazy!! But then I found this:

  http://support.microsoft.com/kb/190197  

Occurs when compiling with binary compatibility on. The above solution suggests turning off binary compatibility and re-compiling - then missing reference will then be highlighted.

Other steps you can try:

  • Rather than turning off BC for everything look for ones that have been recently changed
  • search C: drive and dev folder and delete any *.oca files
  • also look in the vbp file for any oca references
like image 183
DJ. Avatar answered Nov 15 '22 11:11

DJ.