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 & "次機(jī)會!"
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
@王大西
承擔(dān)因您的行為而導(dǎo)致的法律責(zé)任,
本站有權(quán)保留或刪除有爭議評論。
參與本評論即表明您已經(jīng)閱讀并接受
上述條款。