I have a project which requires a password to allow specific users to log on. I have tryed using this:
Private Sub CommandButton1_Click()
Dim strPass As String
strPass = TextBox1.Text
Do Until iTries = 3
If strPass = "Secret" Then
MsgBox "Log in OK!"
Run "LogInOk"
End
End If
MsgBox "Log in NOT OK!"
iTries = iTries + 1
Exit Do
Loop
If iTries = 3 Then Unload Me
End Sub
However when I press the macro command button nothing happens, I have no Idea what is going on. Any help will be appreciated.
Thanks alot
Craig
Private Sub CommandButton1_Click()
Dim strPass As String
strPass = TextBox1.Text
Do Until iTries = 3
If strPass = "Secret" Then
MsgBox "Log in OK!"
Run "LogInOk"
End
End If
MsgBox "Log in NOT OK!"
iTries = iTries + 1
Exit Do
Loop
If iTries = 3 Then Unload Me
End Sub
However when I press the macro command button nothing happens, I have no Idea what is going on. Any help will be appreciated.
Thanks alot
Craig