Illegal parameter. Can't write user-defined type.

This error has the following causes and solutions:

  • You've attempted to write a user-defined type to a PropertyBag object, which is not supported. To work around this, you can write each individual item of the user-defined type to the PropertyBag object.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.