-
Hi!
I have just maked a program
with password protection, but
the only password that works with
program is the one i have "set" .
How can i make the user change the
Username and Password??
I'm using the following code:
Private Sub Command1_Click()
Dim Login As Integer
If WRusername.Text = "Licensed" And WRpassword.Text = "ccwr" Then
Unload Me
WinRestrict.Show
Else
Login = MsgBox("Incorrect login!!", vbCritical)
WRusername.Text = ""
WRpassword.Text = ""
GoTo login2
End If
login2:
End Sub
WRusername & WRpassword are text fields (Text1)
Yours Sincierly
Cybercarsten
-
Private Sub Command_Click()
' Create a new Command Button, and two text boxes where the new name and password can be entered. When they click the new Command button, it will make the changes and load in the new name and password new time they try try to log on.
' This name and password are NOT hidden in the registry but you can scramble them to make it harder to figure out.
SaveSetting App.Title, "Settings", "User Name", TextNewName.Text
SaveSetting App.Title, "Settings", "Password", TextNewPassword.Text
end sub
Private Sub Command1_Click()
Dim Login As Integer
username = GetSetting(app.title, "Settings", "User Name", "Licensed")
password = GetSetting(app.title, "Settings", "Password", "ccwr")
If WRusername.Text = username And WRpassword.Text = Password Then
Unload Me
WinRestrict.Show
Else
Login = MsgBox("Incorrect login!!", vbCritical)
WRusername.Text = ""
WRpassword.Text = ""
GoTo login2
End If
login2:
End Sub
WRusername & WRpassword are text fields (Text1)
This is just something quick and I hope it help you out.