[求助]密码框设计程序?急呀!
如何实现将下面的程序修改成,当输入“12345”以外的的任意5个数字,或多于5个数字时都弹出”密码输入错误“对话框呀?Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim pa As Integer
If KeyAscii >= 33 Then
If KeyAscii <= vbKey9 And KeyAscii >= vbKey0 Then
Else
'把keyascii设为0就是取消输入
KeyAscii = 0
MsgBox "请输入数字!"
End If
End If
If KeyAscii = 13 Then
pa = CInt(Text1.Text)
If pa = "12345" Then
Form3.Show
Else
MsgBox "密码输入错误!"
End If
End If