The Missing Value

Syntax

Variant = Missing
Boolean = IsMissing(String | Variant)

Description

Generally, a String or Variant is marked as Missing if it is an optional parameter in a sub routine and no value is passed and this can be tested using the IsMissing function.

The Missing keyword is provided to allow a Variant (only) to be set to this state if so required.

Example

Print Test(), IsMissing(Test())

Print Test(14), IsMissing(Test(14))

Print Test(Missing), IsMissing(Test(Missing))

 

FunctionVar Test(Optional var)

Test = var

EndFunction

Remarks

A String or Variant containing Missing has no value and will generally cause an error if used in a function or command. It should not be confused with Null or Empty.

In addition, as the value Missing is technically an Error Variant Type, IsError will also return TRUE if it is assigned to a Variant.

See Also

Empty, Nothing, Null

{Created by Sjouke Hamstra; Last updated: 20/06/2017 by James Gaite}