Optional (in Function Statement)

Allows you to define parameters that are passed to a function as optional.

See also: IsMissing

Syntax:


Function MyFunction(Text1 As String, Optional Arg2, Optional Arg3)

Намуна


    Result = MyFunction("Here", 1, "There") ' all arguments are passed.
    Result = MyFunction("Test", ,1) ' second argument is missing.

See also Examples.

Please support us!