You got the error from the compiler or at runtime? If it's at the compiler level, you better post the code because you may have a syntax problem. Otherwise, here is what I do to check if an object has been instanciated correctly:
Dim loObj As MyObject.MyClass
Set loObj = Nothing
On Error Resume Next
Set loObj = New MyObject.MyClass
On Error GoTo 0
If loObj Is Nothing Then
' Error treatment goes here
Else
' OK, we may go on
End If
HTH
>My question is very simple: How can I check if an object has been set to Nothing? I already tried the obvious (i.e. "if myObject = Nothing then ...") but it didn't work because I'm not using the object correctly (at least, that's the message I got from the compiler).