DADiSP Worksheet Functions > Function Categories > ActiveX > Automation Client > ISOBJECT
Returns 1 if input parameter is a handle to an ActiveX object.
ISOBJECT(val)
val |
- |
A series, scalar or string input. |
The scalar 1 if the input is a handle to an ActiveX object, else 0.
d = getobject();
isobject(d)
returns 1
A reference to the current running DADiSP is created.
ie = createobject("internetexplorer.application");
ie2 = ie;
isobject(ie)
returns 1
isobject(ie2)
returns 1
The Internet Explorer object is created and a second reference to the object is copied to the variable ie2.
word = createobject("word.application");
a = isobject(word);
release(word);
b = isobject(word);
a == 1
b == 0
After the word object is created, RELEASE removes the object.
isobject("excel.application")
returns 1 if the Excel automation server is registered in the registry, else 0. The Excel automation server is not instantiated.
x = 100;
isobject(x)
returns 0
If the input is a string, the string is assumed to be the ProgID of an ActiveX server object and the registry is searched for the corresponding CLSID. Only the registry is searched, the server is not started.
For all other input, if the input is not a handle to a running ActiveX object, isobject returns 0.