Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2006

Tip: Looking for answers? Try searching our database.

Password in a macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ordnance1 - 18 May 2006 20:41 GMT
I have a macro which requests a password before allowing one to change a
worksheet. I do not want the password to be case sensitive. My code follows:

On error GoTo Error
If TextBox1.Text <> "groupproject" Then
Unload UserFormPassword

GoTo Error
Exit Sub
Else Unload Password_UserForm
New_Or_Edit.Show

End If
Exit Sub
Error:

Unload Password_UserForm
Invalid_Password.Show

What can be done to make this NOT case sensitive?
Jim Thomlinson - 18 May 2006 20:51 GMT
Use the UCase (or LCase) function to check the Upper case value of what was
entered against the Upper case value of the password. Make sure to UCase both
sides (the entry and the password).
Signature

HTH...

Jim Thomlinson

> I have a macro which requests a password before allowing one to change a
> worksheet. I do not want the password to be case sensitive. My code follows:
[quoted text clipped - 16 lines]
>
> What can be done to make this NOT case sensitive?
Patrick Simonds - 19 May 2006 02:11 GMT
Thanks!

Could not get that to work the way I wanted, but came up with this:

With TextBox1
   .Value = LCase(.Value)
End With

Placed at the beginning of my code, it did the job.

> Use the UCase (or LCase) function to check the Upper case value of what
> was
[quoted text clipped - 23 lines]
>>
>> What can be done to make this NOT case sensitive?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.