Results 1 to 7 of 7

prompt if numeric values inputed is less than five digits

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    prompt if numeric values inputed is less than five digits

    hi again,

    I have a userform which has a textbox for employee id. If an employee enters less than 5 digits, it should prompt the user via msg box that he needs to enter 5 digits for employee id. However my coding doesnt work...can someone help me correct it? thanks

    Private Sub TextBox1_Enter()
    If TextBox1.MaxLength > 5 Then
        MsgBox "Employee ID must be 5 digits", vbInformation
     End If
    End Sub
    Stoey
    Last edited by stoey; 03-05-2009 at 05:08 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1