You can use code from
Re: Is Word/Excel installed Message #
566432 plus error handler as Tore suggested.
>To work with Excel, I have this line:
>
>oExcel = CreateObject("Excel.Application")
>
>When running on a PC without Excel, got this error:-
> "Class definition EXCEL.APPLICATION is not found."
>
>What is the best way to avoid this error?
>
>Cyril
--sb--