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
Stoey![]()
Private Sub TextBox1_Enter() If TextBox1.MaxLength > 5 Then MsgBox "Employee ID must be 5 digits", vbInformation End If End Sub
Bookmarks