hi i have a text box which does not have to exceed 10 characters code below:

Code:
If Len(text1.Text) > 10 Then                      
   MsgBox "text box 1 length out of range"    
End If
so when i type in some text and EXCEED the length of the text box (10) it gives me an message box. which is what i want. BUT after the message box has appeared i can click ok and happily type more characters in. so i was wondering what code i will need so there for more data cannot be entered and if it is then an error message appears?
thanks in advance