ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User Defined Password (https://www.excelbanter.com/excel-programming/403195-user-defined-password.html)

Ken

User Defined Password
 
OK. I am sure somewhere the answer to this question is on this site, but I
can't find it anywhere.
What I am trying to do is this: When the user opens the file and presses
the Log In button. I want the UserForm to check and see if there is a passord
connected to the current file when the Form Initializes. If there is at least
one password stored in the selected ranges I want Label4 to read "Pease Log
In". If there is not, then I want Image1 to show a message telling the User
that he/she "Needs to set up a user account".
I have the Image1 ready to go and all othere labels are set. My question:
is there a way to check for a predefined password set by the user in a
previous session?

So far what I have is:

Private Sub ContactForm1_Initialize()
If PassCount1 = 8 Then 'Password has 8 to 25
characters
Label4.Visible = True
Label4.Caption = "Please Log In"
Image7.Visible = False
End If
If PassCount1 =0 Then
Image7.Visible = True
Label4.Visible = False
End If
End Sub

I can get one or the other part of this function to work or it runs both.
What am I doing wrong in this function in order for it to read both function
independently?

Thanks in Advance to anyone who will help me out with this lengthy problem..

Susan

User Defined Password
 
my (non-guru) idea: :)

be sure to take the time to read the whole thread - there's different
ways of doing it depending on what you need.........

http://groups.google.com/group/micro... 377ccf8f86717

Get UserName from the system

then you can check for the username in your range of passwords & see
if there's a password connected. the original thread may have better/
different coding, this just looked useful to me.
:)
hope it helps!
susan


On Dec 23, 9:39*pm, Ken wrote:
* OK. I am sure somewhere the answer to this question is on this site, but I
can't find it anywhere.
* What I am trying to do is this: When the user opens the file and presses
the Log In button. I want the UserForm to check and see if there is a passord
connected to the current file when the Form Initializes. If there is at least
one password stored in the selected ranges I want Label4 to read "Pease Log
In". If there is not, then I want Image1 to show a message telling the User
that he/she "Needs to set up a user account".
* I have the Image1 ready to go and all othere labels are set. My question:
is there a way to check for a predefined password set by the user in a
previous session?

So far what I have is:

Private Sub ContactForm1_Initialize()
If PassCount1 = 8 Then * * * * * * * * * * * * *'Password has 8 to 25
characters
Label4.Visible = True
Label4.Caption = "Please Log In"
Image7.Visible = False
End If
If PassCount1 =0 Then
Image7.Visible = True
Label4.Visible = False
End If
End Sub

* I can get one or the other part of this function to work or it runs both.
What am I doing wrong in this function in order for it to read both function
independently?

* Thanks in Advance to anyone who will help me out with this lengthy problem..




All times are GMT +1. The time now is 01:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com