>I am using Excel 2000 automated by VFP7. If I use :-
>
>
>GetObject('','excel.application')
>
>
>if there isn't an existing instance of Excel, one is created. If there is an existing instance, a reference to it is returned.
>
>Question: How can I test whether there is already an existing instance of Excel available?
>
>Using Word2000 in the same circumstances, if I use GetObject() and an instance isn't available, I can trap for an OLE error. What about Excel ?
>
>Any ideas ?
>
>TIA
>
>-=Gary
Gary,
I would never suggest using GetObject() with excel (it's sampled in docs but behaviour is not consistent). Even if that works right all the time a new instance is created (unlike word-but IMHO buggy one is word). Use createobject instead. To use the same instance use workbooks collection (add, open).
Cetin