Invalid length for fixed-length string

This error has the following causes and solutions:

  • A fixed-length string is declared with zero length. A fixed-length string must have at least one character.

  • A fixed-length string exceeds the limit of 65,526.

    Reduce the length specified for the fixed-length string.

    Note Variable-length strings can exceed the upper limit and can have zero length.

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.