Option Explicit
Private Sub Command1_Click()
Static a As Integer '静态变量
Dim m As Integer
If a > 2 Then
m = MsgBox("校检失败不能超过3次,要不切你小JJ!", vbInformation, "恭喜!")
Unload Me
End If
If Text1.Text = Text2.Text Then
m = MsgBox("输入一致!", vbInformation, "恭喜!")
Else
Text1.Text = a
Text2.Text = ""
a = a + 1
End If
End Sub