think best way is to check before it goes to the textbox
like this
Kind regards![]()
Private Sub TextBox1_Enter() vervolg: mystring = InputBox("Value for textbox 1 ?") If Len(mystring) = 4 And Val(mystring) > 0 Then TextBox1 = mystring: TextBox2.SetFocus Else: MsgBox "Must be 4 digits in this field ": mystring = "": GoTo vervolg End If End Sub
Leo
Bookmarks