Borislav:
With Excel 2000 getobject will always create an instance of Excel <s>. So, it wont error, so, you can't trap for it because it wont error.
>OK try this:
>
>old_error = ON("ERROR")
>fl_error = .f.
>ON ERROR fl_error = .t.
>oExcel = GetObject(,"Word.Application")
>IF TYPE("oExcel") # "O" .OR. ISNULL(oExcel) .OR. fl_error
> oExcel = CreateObject("Excel.Application")
>ENDIF
>
>ON ERROR &old_error
-=Gary