Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 590
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User Defined Type not Defined error Chip Pearson Excel Programming 0 December 7th 06 07:09 PM
"User-defined type not defined" message in Excel RW1946 Excel Discussion (Misc queries) 0 August 31st 05 12:14 PM
Workspace faux user-defined type not defined Chris S[_2_] Excel Programming 3 November 11th 04 05:51 PM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
Word.Document - user defined type not defined jowatkins[_7_] Excel Programming 0 January 20th 04 08:46 AM


All times are GMT +1. The time now is 08:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"