Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could use this Exit event code for the TextBox (assumed to be named
TextBox1 for this example)... Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Len(TextBox1.Text) 0 And Len(TextBox1) < 5 Then Cancel = True MsgBox "Your entry must be at least 5 characters long." End If End Sub As written, the code allows the user to exit the TextBox if there is no entry in it (that is what the 0 test provides for). -- Rick (MVP - Excel) "sam" wrote in message ... how do we restrict user to input minimun characters in a text box on userform. for eg. I want to make zip code field such that users need to input atlest 5 characters, and not anything less then that. thanks in advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Restrict Users | Excel Discussion (Misc queries) | |||
how to restrict users on what options they can choose? | Excel Programming | |||
how do you restrict the users from copying and pasting | Excel Discussion (Misc queries) | |||
restrict users | Excel Worksheet Functions | |||
Is there any way for me to allow or restrict individual users' ab. | Excel Worksheet Functions |