ISMISSING function

Purpose | Determine whether an optional parameter was passed by the calling code.
Syntax | ParamStatus = ISMISSING(ParamVar)

Remarks

The ISMISSING function may be used to test certain optional parameters to determine whether or not the parameter was actually passed by the calling code. It may be used to test ByVal/ByRef VARIANT parameters, or other variable types passed ByRef. An attempt to test a ByVAL parameter other than VARIANT will generate an error 579 (BYREF variable or BYVAL/BYREF variant expected) to be generated during compilation.

A ByRef parameter is considered to be missing when the pointer has the value zero. A variant parameter is considered to be missing when it has a type of %VT_ERROR and an error value of %DISP_E_PARAMNOTFOUND.

If the specified optional parameter is missing, the value true (-1) is returned. Otherwise, the value false (0) is returned.

Restrictions | The ISMISSING function may only be used within the procedure which uses the specified optional parameter.
See also | DECLARE, FUNCTION, METHOD, PROPERTY, SUB