minimum value of a text box

  • Hi everyone,


    how can i have a minimum value to a cell i.e you have to enter 6 digits


    my current code stops someone entering a letter and the max length is set in the vb properties but now im lost!!


    my code:


    Private Sub GlobalAccount1_Change()
    Dim TbCheck


    If TbCheck = IsNumeric(GlobalAccount1) Then
    MsgBox "This is an invalid entry! Please delete and retype a number "
    End If
    TbCheck = IsNumeric(GlobalAccount1)
    End Sub

  • Hi stevehorton09


    Try the code below

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!