Something like this?
[tt]dim xl as object
on error resume next
' get current instance of excel
set xl=getobject(,"excel.application")
if err.number<>0 then
' excel not open, then create an instance
err.clear
set xl=createobject("excel.application")
if err.number<>0 then
' excel not installed?
err.clear
exit sub
end if
end if
on error goto <your error handler>
'...[/tt]
- typed not tested
Roy-Vidar