MaxLength property
Specifies the maximum number of characters a user can enter in a TextBox or ComboBox.
Syntax
object.MaxLength [= Long ]
The MaxLength property syntax has these parts:
Part | Description |
---|---|
object | Required. A valid object. |
Long | Optional. An integer indicating the allowable number of characters. |
Remarks
Setting the MaxLength property to 0 indicates that there is no limit other than that created by memory constraints.
See also
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.