>>How do you test for the presence of an active object?
>>
>>thanks, Randy
>
>one way us vartype() function.
>
>vartype(oApp) returns 'O' if oApp exists as an object, 'U' or 'X' if it doesn't. Look up in help to see possible return values...
Not exactly. VARTYPE(oApp) or TYPE("oApp") will still return "O" if oApp was NULLified and does not exist anymore. It is better to add the check AND !ISNULL(oApp), or check for TYPE("oApp.Name") = "C" (excluding the objects which created with SCATTER NAME command - they don't have native .Name property.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison