K
Karen53
Hi,
I'm not sure I can do this. I've been unable to figure out how, but I have
created a password form. I need to use this form to unlock specific cells
and run code depending on the password being correct. I am successful if
there is only one routine the password form is unlocking. I need a value of
true or false to be pulled into multiple routines. I'm thinking a function
but I can't figure out how to achieve it. I'm hung up on where do I go with
cmdOK?
Function GoodPassword(GoodPswd) As Boolean
Dim HasPswd As String
frmPassword.Show
HasPswd = frmPassword.txtGetPswd
Unload frmPassword
GoodPswd = False
If HasPswd = "" Then
GoodPswd = False
Else
If HasPswd = MyPassword Then
GoodPswd = True
End If
End If
End Function
I'm not sure I can do this. I've been unable to figure out how, but I have
created a password form. I need to use this form to unlock specific cells
and run code depending on the password being correct. I am successful if
there is only one routine the password form is unlocking. I need a value of
true or false to be pulled into multiple routines. I'm thinking a function
but I can't figure out how to achieve it. I'm hung up on where do I go with
cmdOK?
Function GoodPassword(GoodPswd) As Boolean
Dim HasPswd As String
frmPassword.Show
HasPswd = frmPassword.txtGetPswd
Unload frmPassword
GoodPswd = False
If HasPswd = "" Then
GoodPswd = False
Else
If HasPswd = MyPassword Then
GoodPswd = True
End If
End If
End Function