tags:

views:

173

answers:

1

I have a VB6.0 project that contains the line

Implements IObjectSafety

I tried reopening this prject and compile it (.dll)

it throws an error like

---------------------------
Microsoft Visual Basic
---------------------------
Compile error:

User-defined type not defined
---------------------------

tried to fix it using this url http://support.microsoft.com/kb/191207

but still no use

is there any help/ suggestions on this

A: 

Where is the class IObjectSafety defined? Is it part of your own project?

If it is defined in another project, make sure that you have referenced the project/DLL correctly & the class is public.

EDIT: Remove the line Implements IObjectSafety and type it again. Compile it & see if that works.

EDIT2: Could you remove all the code that is related to IObjectSafety and see if it compiles. And then add the Implements line at the top & add code progressively.

Does that help?

EDIT3: Here is the last thing, I could think of.

  • Remove the reference to the DLL
  • Remove the code that relates to IObjectSafety
  • Save the project, Compile it, Close it.

  • Open the project containing IObjectSafety class & compile it.

  • Close this project.

  • Open the project that will be using IObjectSafety

  • Add the reference to the library containing IObjectSafety
  • Compile the code

What happens?

shahkalpesh
Yes its defined in the same project
balalakshmi
Correction: I meant the line "Implements IObjectSafety " is in the same projectthe relevant references as mentioned in KB http://support.microsoft.com/kb/191207 are added
balalakshmi
shahkalpesh
tried retyping the line Implements IObjectSafetystill not compiled
balalakshmi
balalakshmi