Try
If not len(TextBox1) = 7 Then
MsgBox "The entry has to be 7 digits long"
TextBox1.SetFocus
Exit Sub
End If
--
mudraker
------------------------------------------------------------------------
mudraker's Profile:
http://www.excelforum.com/member.php...fo&userid=2473
View this thread:
http://www.excelforum.com/showthread...hreadid=540634