EditMaxLength Property

Returns or sets the maximum number of characters that can be entered in the editor.

Syntax

[form!]VSFlexGrid.EditMaxLength[ = value As Long ]

Remarks

Set this property in the BeforeEdit event to limit the length of the text that may be entered while editing a cell.

Setting EditMaxLength to 0 allows editing of strings up to about 32k characters.

Changing this property while editing a cell does not affect the contents of the editor but will affect subsequent editing.

The following code will allow the user to enter only 4 characters into the cell being edited.

Private Sub fg_BeforeEdit(ByVal Row As Long, ByVal Col As Long, Cancel As Boolean)

       fg.EditMaxLength = 4

End Sub

Data Type

Long

See Also

VSFlexGrid Control