can anyone pls help me with this.. ngtry pu kz q gumawa kaso di xa nagteterminate ih.. di xa ngloloop hanggang maging 3 ung Counter.. pahelp nman pu...(T-T) e2 ung codes q:
Private Sub Command1_Click()
Dim Counter As Integer
If txtUserName = x Then
Call PasswordOption
Else
MsgBox "Access Denied!"
txtUserName.SetFocus
Counter = Counter + 1
SendKeys "{Home}+{End}"
End If
If Counter = 3 Then
MsgBox "You reached the maximum attempts allowed to log in. System is now terminating.."
End
End If
End Sub
Private Sub PasswordOption()
If txtPassword = y Then
MsgBox "Welcome! Login succeded!"
Else
MsgBox "Access denied!"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
Counter = Counter + 1
If Counter = 3 Then
MsgBox "System will now terminate!", , "MIS"
End
End If
End If
End Sub
Private Sub Form_Load()
Counter = 0
End Sub
PS: im just a newbie so pls explain to me ur suggestion in a way that a beginner will understand..
thanks pu sa mga mag-aaksaya ng oras 2mulong sken... heheh..
- Add new comment
- 209 views