>No, because as soon as you check the object, it will create the instance.
FYI, VFP return NULL if the object wasn't created.>>Dim loUtility As dexutility.dexutility '>Set loUtility = New dexutility.dexutility '<-- Error
>Which error?
Automation error.>Why does your component name and your class name the same?
For no particular reason. Is there a problem with that?>Did you create the component yourself?
Yes, in VFP.>If so, what is the instancing property value?
I don't understand this question.
Normally, the object will instanciate correctly and I won't have to bother with it, but I prefer to do some defensing programming so that I'm not bitten by a strange bug latter on. Like I said above, the class is built in VFP. To get the error I showed you, I modified my class to return false in the initialisation event. Doing so in VFP will prevent the class from instanciating. I don't return false everytime in the initialisation event of my class, but I may do so if there was an error or a required parameter wasn't passed.