Hi
Wile reading a book, I came across this function and I try to grasp it, yet there is something I am clearly missing. I tried to create pseudo password login. I crated a userform, added text field and login button. I added code:
if I simply call ExitApp, it closes workbook, leaving app open. If I try to use OnTIme (commented out), nothing happens.
If you could head me into direction, what I'm missing here, what should I look for to learn more
Thanks
Wile reading a book, I came across this function and I try to grasp it, yet there is something I am clearly missing. I tried to create pseudo password login. I crated a userform, added text field and login button. I added code:
Code:
Private Sub confirmPassword_Click()
If passwordBox.Text = "qwerty" Then
Unload Me
Else
greetingLabel.Caption = "Password Not Recogized"
'Application.OnTime Now + TimeValue("00:00:05"), "ExitApp"
Call ExitApp
End If
End Sub
Sub ExitApp()
Unload PasswordForm
ActiveWorkbook.Close (False)
End Sub
if I simply call ExitApp, it closes workbook, leaving app open. If I try to use OnTIme (commented out), nothing happens.
If you could head me into direction, what I'm missing here, what should I look for to learn more
Thanks