MaxLength Property (ATextBox)

Returns or sets the maximum length of text the user can enter in the ATextBox object. 

Syntax

Object.MaxLength [ = lMaxLength ]

The MaxLength property syntax has the following parts:

 

Name

Type

Description

Object

ATextBox

ATextBox control

lMaxLength

Long

An integer specifying the maximum length of text the user can enter.

Comments

The default is 0 - the maximum length will be 32K characters. Setting this property to less than the length of the current text will truncate the text.

In a multi-line mode each line break takes two characters.

Example

The following statement allows the user to enter up to ten characters for password:

tbPasszword.MaxLength=10

Applies to

ATextBox

See Also

MultiLine, Text