Private Sub Command1_Click() '登录
Static i As Integer
'姓名text1 密码text2
If Text1 = "wanglili" And Text2 = "12345" Then
MsgBox "欢迎您进入本系统!"
Else
i = i + 1
If i <= 3 Then
If MsgBox("您不能进入!请重新输入认证信息!", vbCritical + vbRetryCancel) = vbCancel Then
Unload Me
Else
Text1.SetFocus
End If
Else
MsgBox "对不起,您不能进入本系统!"
End If
End If
End Sub
Private Sub Command2_Click() '关闭
Unload Me
End Sub
Private Sub Command1_Click()
Static n As Integer
n = n + 1
a = Text1.Text
b = Text2.Text
If a = "wanglili" And b = "12345" And n <= 3 Then
MsgBox "欢迎您进入本系统!"
n = 0
Else
If n < 3 Then
MsgBox "对不起您不能进入!请重新输入认证信息!"
Else
MsgBox "对不起,您不能进入本系统!"
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
你是在学习当中吗?
需要我搞定吗