Argument not optional (Visual Basic)

The number and types of arguments must match those expected. Either there is an incorrect number of arguments, or an omitted argument is not optional. An argument can only be omitted from a call to a user-defined procedure if it was declared Optional in the procedure definition.

To correct this error

  1. Supply all necessary arguments.

  2. Make sure omitted arguments are optional. If they are not, either supply the argument in the call, or declare the parameter Optional in the definition.

See Also

Error Types