I think if you use the keypress, like example below, it will give you
what you want.
Private Sub txtAcctNum_KeyPress(ByVal KeyAscii As
MSForms.ReturnInteger)
If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
MsgBox ("Please enter numbers only")
End If
End Sub
Or AfterUpdate might better meet your needs, see below for an
example:
Private Sub txtAcctNum_AfterUpdate()
Dim hold As Integer
If Len(txtAcctNum) > 5 Then
MsgBox ("Account Number can not exceed 5 digits")
End If
End Sub