Private Sub Text1_Change() If Text1.Text <> "" Then tp = Asc(Right(Text1.Text, 1)) If tp < Asc("0") Or tp > Asc("9") Then Text1.Text = Left(Text1.Text, Len(Text1.Text) - 1) Text1.SelStart = Len(Text1.Text) End If End If End Sub