Public cnt As Integer
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
cnt = 0
End Sub
Private Sub TextBox1_KeyPress(ByVal KeyAscii As
MSForms.ReturnInteger)
If KeyAscii = 13 Then
'Enterを押した時の処理
Exit Sub
End If
cnt = cnt + 1
If cnt > 3 Then
'規定文字数になった時の処理
TextBox2.SetFocus
End If
End Sub