Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What exactly do you mean by "restrict textbox"? If you are talking about
"approving" an entry when the user tries to leave the TextBox, then you can use something like this... Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Not TextBox1.Text Like "[A-Za-z][A-Za-z][A-Za-z] ##" Then Cancel = True MsgBox "Your entry is not in the proper format!" TextBox1.SelStart = 0 TextBox1.SelLength = Len(TextBox1.Text) End If End Sub If you have something else in mind when you say "restrict", you are going to have to tell us what it is that you want to do. Rick wrote in message ... Hi, How to restrict textbox in userform for the following entry SEP 08 I mean first three cheractors Alphabatic and space and two cheractors number. Regards. Shahzad |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Textbox validation | Excel Discussion (Misc queries) | |||
textbox validation | Excel Programming | |||
textbox value validation | Excel Programming | |||
Textbox validation | Excel Programming | |||
textbox validation | Excel Programming |