- Home
·
- Encryption
·
- This will allow the user to enter the code only three times, then it will unload the form.
This will allow the user to enter the code only three times, then it will unload the form.
This will allow the user to enter the code only three times, then it will unload the form.
Rate This will allow the user to enter the code only three times, then it will unload the form.
(2(2 Vote))
Dim strPassword As String
Static intCounter As Integer
Dim intMsg As Integer
strPassword = txtPassword.Text
intCounter = intCounter + 1
If intCounter = 1 Or intCounter = 2 And strPassword <> "DOG" Then
intMsg = MsgBox("Stike " & intCounter, vbOKOnly, "Password")
End If
If intCounter > 2 And strPassword <> "DOG" Then
intMsg = MsgBox("Strike " & intCounter & " your out.", vbCritical, "Password")
Unload Form1
End If
End Sub
This will allow the user to enter the code only three times, then it will unload the form. Comments
No comments yet — be the first to post one!
Post a Comment