VB 用text框模仿输入序列号

来源:百度知道 编辑:UC知道 时间:2024/06/05 10:12:18
控件:text1,text2,text3
要求是像输入序列号那样在text1里面只需要输入6个数字后,超过6个数字,在text2中显示输入,再超过在text3中显示输入,并且光标会也会移动到text2,text3里面

Private Sub Text1_Change()
If Len(Text1.Text)> = 6 Then Text2.SetFocus
End Sub

Private Sub Text2_Change()
If Len(Text2.Text) >= 6 Then Text3.SetFocus
End Sub

修正楼上的。
Private Sub Text1_Change()
If Len(Text1.Text)> = 6 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_Change()
If Len(Text2.Text) >= 6 Then
Text3.SetFocus
End IF
End Sub

一楼没错。。
二楼以为一楼错了。。修正了一下
二楼"修正"后的结果也没错。。
呵呵。就是这样

1楼是正确的,2楼你修个啥??