[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]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.