Hi Ed,
I wanted to know if there is another way of checking that the COM did instanciate correctly.
My COM is built in VFP. In it's Init() event, I may return .F. if something is wrong. Like you know, this will prevent the COM from instanciating. In VFP, I would write this code:
loCOM = NewObject("MyCOM.MyClass")
IF VarType(loCOM) = "O"
*-- Use loCOM here
ELSE
*-- Display error message
ENDIF
I was wandering if there is a similar approach in VB. In my test, if my COM return .F. in it's Init() event, VB throw an error on the line:
Set loCOM = New MyCOM.MyClass
Is there another way than using On Error in this case?
TIA
>My guess is that it's how he's handling errors in VB; ordinarily I'd trap the failed instantiation by wrapping the SET in an in-line error handler, but I'm far from a VB expert.