Optional parameters cannot be declared as the type '<type>'

Optional parameters cannot be of the data type of a structure.

Error ID: BC30423

To correct this error

  1. To pass a structure to an optional parameter, declare the parameter as Object.

  2. Use CType to cast the parameter to that structure type within the procedure.

See Also

Concepts

Structures and Classes

Reference

CType Function