![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
I am doing an ICT project and wish to use a password function on the opening page, to allow diffrent users to enter. And For this I want to make the text appear as stars, and I have tried but i cannot do this. Any help would be greatly appreciated.
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sunny, spring-like Hull
Posts: 3,339
|
One way would be to use a textbox on a userform for password entry. Right-click on the textbox, select Properties and change the PasswordChar property of the textbox to an *.
|
|
|
|
|
|
#3 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi
Use a UserForm with a single TextBox and set the "PasswordChar" property of the TextBox to "*" |
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
thanks,
if I used this method is thn possible for it to detect a specific usrname and password, and then reject this user if the password or username is incorrect. I have a database where I have the username and passwords of users who have "joined" and then I have aslo made a code for this, with the 3 left letters of each the username and password and then used the concanetate to make them into a 6 lettered code. Dont know if this is the proper way to go around it, but thats what i've done so far. thanks alot craig |
|
|
|
#5 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Try some code like this to check the password. It gives them 3 tries and then closes. If they get it correct the chosen Procedure is run:
Private Sub CommandButton1_Click() Dim strPass As String strPass = TextBox1.Text Do Until iTries = 3 If strPass = "Secret" Then MsgBox "Log in OK!" Run "LogInOk" End End If MsgBox "Log in NOT OK!" iTries = iTries + 1 Exit Do Loop If iTries = 3 Then Unload Me End Sub |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|