Sub 密码验证()
Dim n%
For n = 3 To 0 Step -1
psd = InputBox("请输入密码!")
Select Case psd
Case "888"
MsgBox "登录成功"
Exit For
Case Else
If n > 0 Then
MsgBox "密码错误,您还剩余" & n & "次机会!"
Else
MsgBox "密码错误,请等待30分钟之后再次登录!"
End If
End Select
Next n
End Sub
sub test()
dim a,b
for a = 3 to 1 step -1
b=inputbox(" password")
if b="111" then
msgbox "ture"
exit for
else
msgbox "you only have" & a &"times"
end if
next a
end sub
@王大西
承担因您的行为而导致的法律责任,
本站有权保留或删除有争议评论。
参与本评论即表明您已经阅读并接受
上述条款。