The code is:
Option Explicit
Public LoginSucceeded As Boolean
Private Sub cmdCancel_Click ()
'set the global var to false
'to denote a failed login
LoginSucceeded = False
End Sub
Private Sub cmdOK_Click()
'check for correct password
If txtPassword = "" Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.Set Focus
SendKeys "{Home}+{En d}"
End If
End Sub
I want to make it so if the user puts in their password and it works, but i have tried
"Private Sub cmdOK_Click()
'check for correct password
If txtPassword = 0 Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True"
But it didn't work please Help anybody
Yoda (Canada Eh)
Option Explicit
Public LoginSucceeded As Boolean
Private Sub cmdCancel_Click ()
'set the global var to false
'to denote a failed login
LoginSucceeded = False
End Sub
Private Sub cmdOK_Click()
'check for correct password
If txtPassword = "" Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.Set Focus
SendKeys "{Home}+{En d}"
End If
End Sub
I want to make it so if the user puts in their password and it works, but i have tried
"Private Sub cmdOK_Click()
'check for correct password
If txtPassword = 0 Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True"
But it didn't work please Help anybody
Yoda (Canada Eh)
Comment