loock max lengt in textbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sal21
    New Member
    • Jun 2006
    • 27

    loock max lengt in textbox

    I have this code in textbox, is possible to limit the user to insert in this textbox max 4 digit?
    Tks.


    Private Sub SPORTEL_Change( )

    If IsNumeric(Me.SP ORTEL.Value) Then
    dblNum = Me.SPORTEL.Valu e
    Me.SPORTEL.Valu e = Format(dblNum, "0000")
    Else
    Me.SPORTEL.Text = Empty
    Exit Sub
    End If

    Call CONTROLLO

    End Sub
  • xinariscy
    New Member
    • Sep 2008
    • 14

    #2
    If you want max limit just set MaxLength value to 4 from the textbox properties.

    Comment

    Working...