Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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.. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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.. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User Defined Type not Defined error | Excel Programming | |||
"User-defined type not defined" message in Excel | Excel Discussion (Misc queries) | |||
Workspace faux user-defined type not defined | Excel Programming | |||
User-defined data type; Error: Only User-defined types... | Excel Programming | |||
Word.Document - user defined type not defined | Excel Programming |