Userform To Act As A Login With A Password To Use The Spreadsheet

Apr 12, 2007

I have come up with the idea to create a userform to act as a login page for my project. I have the project complete and need a way to protect it. I want the userform to display an input box asking the user to enter their 'login ID'. This has to be either "SUPERVISOR" or "STAFF". Or If I have a table of 'users' and 'passwords' in sheet (USERS) to match them against that if it is easier?

Upon correct entry i need it to then display another input box asking for a 'password'. This needs to be "SHOES" for both logins. If the login is not equal to SUPERVISOR or STAFF I need a message box displaying "username incorrect". and for it then to show the input box requesting the 'login ID' again. Again if the password is not equal to "SHOES" to display a message box displaying "password incorrect" Then show the input box requesting the password. Upon correct entry for both the username and password i would like my other userform to show. This is displayed by:

Load UserForm1
UserForm1.Show

I would like the correct 'username' to be displayed in cell "D27" on the active sheet and 'password' to be displayed in cell "F27" also on the active sheet To show who is 'Logged On'. If there is a way to display the password using asterix's for security that would be useful.

View 6 Replies


ADVERTISEMENT

Userform To Act As A Login With A Password

Apr 12, 2007

I want the userform to display an input box asking the user to enter their 'login ID'. This has to be either "SUPERVISOR" or "STAFF".

Upon correct entry i need it to then display another input box asking for a 'password'. This needs to be "SHOES" for both logins.

If the login is not equal to SUPERVISOR or STAFF I need a message box displaying "username incorrect". and for it then to show the input box requesting the 'login ID' again.

Again if the password is not equal to "SHOES" to display a message box displaying "password incorrect" Then show the input box requesting the password.

Upon correct entry for both the username and password i would like my other userform to show. This is displayed by:

Load UserForm1
UserForm1.Show

I would like the correct 'username' to be displayed in cell "D27" on the active sheet and 'password' to be displayed in cell "F27" also on the active sheet.

If there is a way to display the password using asterix's for security that would be useful.

View 9 Replies View Related

Verify Password / Login Userform To Worksheet?

May 23, 2014

I am trying to create a log-in page on a userform, frmlogin in "sheet3." The userform is simply a textbox, Username (txtuser) and a textbox, Password (txtpass). Command Button is cmdcheck

I want the User to enter their username and password and for my macro to verify that they match referencing data in a seperate worksheet, (Sheet6).

Upon verification I want the user to be unloaded on "sheet1"

I am currently getting this message: "unable to get vlookup property of the worksheetfunction class"

VB:
Private Sub cmdcheck_Click()
Dim Username As String
Username = txtuser.Text

[Code]....

View 9 Replies View Related

Password Userform - Login Function To Enter Data

Mar 10, 2014

I have a userform that numerous people need to fill in. I want to add a login function so that each person has their own login detail. Their will be a command button called login. Until they login in they cannot enter any data.

View 4 Replies View Related

Password For Custom Userform Login Only Works With Text Passwords?

Mar 21, 2014

Im using the following code on a User login userform. This code is for the Login command button to access the workbook (the user clicks on it after entering there username and password).

For some reason if the password is numbers only it just returns message box "Incorrect password, try again."

As soon as I put a single letter into the password it works fine,

[Code]....

View 4 Replies View Related

Excel 2010 :: Userform As Login Form - VBA To Validate Username And Password

Jun 18, 2012

Using Excel2010 in Windows7. I have a UserForm

1: TextBox for Input Username (txtUsernameIn)
2: TextBox for Input Password (txtPasswordIn)
3) Submit Button (cmdSubmit1)

I have a Worksheet
ColA: Username
ColB: Password
And this entire Range A:B, I have named "UserRegister"

I have code, attached to the cmdSubmit1 button on my UserForm. The purpose is to allow access to a veryhidden Worksheet "ADMIN".

The code 'works' if I enter in both the correct UserName and Password (ie: the code completes & Admin sheet opens up).

The code 'works' if I enter in the correct UserName and the wrong password (ie: code completes it's run, my msg pops up to say there is wrong input, unloads the form & sheet ADMIN stays veryhidden).

However, if I enter the wrong username (with either right or wrong password) the code breaks and I get a debug error. I know my code is obviously wrong/missing something etc - but I can't work it out! The line of code highlighted on the break, is between the *** below

VB:
Private Sub cmdSubmit1_Click()
Dim Username As String
Username = txtUserNameIn.Text
Dim password As String
password = txtPasswordIn.Text

[Code] ......

View 9 Replies View Related

Username / Password At Login

May 31, 2013

I have below piece of code which I'm not sure how to finish up. What I'm trying to do is have 'Username' and 'password' entered before logging into the workbook. It does not have to be 'UserForm" if it is possible, but it would be useful if we use Ucase...

I'm just not sure how this code works with

"Sub sUserLogon(strStandardID As String, strPassword As String)"

stated in this way..

VB:
Sub sUserLogon(strStandardID As String, strPassword As String)
Dim strUserName As String
Dim StrMessage As String
Application.DisplayAlertsAlerts = False
StrMessage = "User Logged In"

[Code] ......

View 2 Replies View Related

Code To Verify Password On Login

Feb 22, 2014

I found some username and password login code that I am editing for my needs, but I am having some trouble with it. I keep getting run time error '448': Named argument not found on the following line:

MatchCase:=False, SearchFormat:=False)

[Code] .....

I have also attached my workbook.

Equipment Return Log.xlsm‎

View 2 Replies View Related

Password Login To View Sheets

Mar 13, 2008

I have a workbook which, on opening, shows a logon form and depending on the username and password entered only certain sheets open - there are about 10 usernames and passwords - i have only included 2 to keep the code a bit shorter. I got the code below from here and it works perfectly but I want to make it a bit easier to add new usernames and passwords and am thinking of using a Vlookup table. The code i currently use is:

Option Explicit
Const sName1 As String = "Lisa"
Const sName2 As String = "Philip"
Const sPw1 As String = "update"

Dim sPW As String, sUser As String
Dim sMsg As String, sTitle As String, sStyle As String
Dim iCounta As Integer
Private Sub cmbValidate_Click()
sTitle = "Incorrect Password"...........

View 5 Replies View Related

Login And Password Prompt Prior To ODBC Connection?

Apr 23, 2013

i currently have an excel based application with VBA code. I'm trying to add some controls around the app by prompting user for login and password credentials prior to ODBC connection at runtime. So when application is launched, prompt appears, user enters login and password, if correct, it goes on to verify user has ODBC connection at runtime.

View 2 Replies View Related

Create Username And Password To Login Into A Macro Enabled Workbook

Jan 3, 2011

I need a macro ie when a user opens a macro enabled workbook,he should be asked for a username and password to access workbook. Administrator should have right to create users with reset password rights

View 5 Replies View Related

Creating Login Via A Userform?

Dec 6, 2013

[URL]

Basically I’m trying to create a login userform that launches once the database opens.

Userform = LoginTextbox = UserformTextbox = PasswordCommand Button = UserloginCommand Button = UsercloseSheet containing passwords = Userpasswords
Usernames are stored vertically in the A column, and Passwords vertically on the B column both starting from row 1.

I’ve been using code found at [URL] but I’m struggling to make it work. Some of the variables listed below may be useless but I’m not entirely sure so I’m sceptical about removing them. !

VB:
Option Explicit
Dim ws As Worksheet
Dim Userpasswords As Worksheet

[Code]....

View 5 Replies View Related

Password Protect The Spreadsheet?

Nov 30, 2009

I need to make my spreadsheet require a password to open. How do I do this?

View 2 Replies View Related

Spreadsheet Password Protection

Jul 24, 2008

I have a payroll spreadsheet that is going to be placed on our network server. My boss wants me to have this spreadsheet to be protected so that one person can get in, add hours and commission, and save it up on the server. Then another person can go in to that spreadsheet, open it up to get the info and use it to cut the checks. What my problem is that the person who is making the changes does not need to see the pay rate or the total dollar amount columns, but the person who gets the data out does. Neither one of these people really know how to hide and unhide columns in Excel, so I need it to have when one password opens it, the pay rate and total pay columns are hidden, but the other password will show those columns.

View 9 Replies View Related

Password Box For Spreadsheet Open

Apr 19, 2006

I am just wondering if it is possible to insert a module or a code such that it is user specific.

In detail, there are two types of users: Administrator and User.

If it were administrator, it should ask for a password. If user, it should give the read-only or a protected form of the spreadsheet.

I just need the workbook to pop-up with a msgbox of administrator/user with a radio button or a select button. If administrator, it should ask for a password. Also, disabling the macros should not open the spreadsheet as making this would lead to nothing.

View 3 Replies View Related

How To Open Password Locked Spreadsheet

Jun 18, 2013

I inherited a spreadsheet from a recently let go co-worker. This spreadsheet has a lot of important financial data on it, so I really need to get into the spreadsheet. we contacted the former employee and he said he forgot the password. Is there any work around to get into the sheet?

View 2 Replies View Related

Disable Password Prompt Upon Opening Spreadsheet

May 29, 2008

have a password protected spreadsheet with a userform for people to enter data. This allows them to enter data, but stops them from editing or deleteing data once entered.

When the spreadsheet is opened, it asks for a password to unlock it. Hitting cancel allows the user to continue and the userform pops up for the user to enter data. I would like to disable the initial password prompt when the file is opened to avoid confusion on the users part.

View 9 Replies View Related

Password Protect/hide The Spreadsheet, Not Forms

May 17, 2007

I am making a database system that tracks student activity in my schools lab for people taking foreign language courses. I'm trying to make it so students must use the userform to manage they're checking in and out, and not be able to have any direct access to the Spreadsheet itself. Also, it would be nice if the whole Spreadsheet was hidden, invisible, and only the user forms could be seen.

View 4 Replies View Related

Online Spreadsheet To Share Between Few Friends With Password Option?

Dec 25, 2004

Is there anywhere I can set up a Online Excel Spreadsheet to share with a few friends with a password option to prevent people from looking at it?

I need everyone in the group to be able to update and save the spreadsheet

View 2 Replies View Related

Opening My Spreadsheet Which Will Only Open If The Correct Answer/ Password Is Typed

Apr 22, 2009

upon opening my spreadsheet which will only open if the correct answer/ password is typed.

I’d need to store the questions, passwords/ answers somewhere for VB to look up I guess??

Capital of England – London
Capital of France – Paris
Capital of Italy – Rome

Etc etc

And then I need coding which will open one of the random questions, which will only grant access to the spreadsheet if the correct answer is typed.

View 9 Replies View Related

Run Userform: Show A Userform In The Spreadsheet Environment

Jul 25, 2006

how do i show a userform in Excel in the spreadsheet environment? I used to "run macro" but unable to run userform code "private sub".

View 2 Replies View Related

Use Userform Password Screen

Aug 4, 2009

I have a UserForm that I want to use as a Password screen
The form has a label, CommandButton and TextBox.

When I run the UserForm, IF you click OK without entering the Password, you still gain access to the Workbook!
IF you type in the wrong Password you still gain access to the Workbook and NO "Invalid password!" message pops up.

What I would like to happen IF the CommandButton is clicked without entering the Password, is for the Workbook to close, and IF the Password is correct, I want to load Useform2

I am using the following code provided by rorya, that I got from here.....
http://www.mrexcel.com/forum/showthr...light=password

[CODE]
Option Explicit
Private Sub CommandButton1_Click()
Me.Hide
End Sub
Private Sub UserForm_Initialize()
Me.TextBox1.PasswordChar = "*"
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Me.Hide
End Sub

Sub Mycode()
Dim frm As UserForm3
Set frm = New UserForm3
frm.Show
If frm.TextBox1.Text = "Password" Then
' run your code
Else
MsgBox "Invalid password!"
End If
Unload frm
End Sub
[CODE]

View 9 Replies View Related

Password Protection In Userform

Jul 20, 2006

See the attachment. Once you enable it. A userform will ask you for a password. Enter "aes" that will let you in.

My question is, when I enter the wrong password the first time, a userform popsup and asks for the correct the password. once I do place the correct password in the 2nd attempt. The file gets deleted!

It is not suppose to happen. I understand if I entered the password wrong twice the deleteing should take place.

View 9 Replies View Related

Userform To Change Password Not Working

May 29, 2009

Below is code i wrote to change a password. password value is hidden in cell iv4 in different sheets. My userform contains 3 textboxes and button to run macro. As long as old password matches cell value AND new password is entered twice correctly then it will change value in cell iv4.

View 4 Replies View Related

How To Make Userform That Works As Password Box

Jun 19, 2014

I want to make a user form that works as a password box. I have UserForm1 which is my "Menu" and I created UserForm2, which is my password entry form. The problem I have is that once I click "go" on my password box (which works fine), the Password Box closes but the user form remains open. I want the user form to close as well when I click "Go". So, my password box should close both UserForm1 and UserForm2.

Here is my code:

Private Sub cmdPasswordGo_Click()
Dim UserName, Password As String
UserName = txtUserName.Text
Password = txtPassword.Text
If UserName = "Chad" And Password = "Pass01" Then
Unload Me
Else: MsgBox "Your authentication cannot be validated"
End If
End Sub

My issue is that once UserForm2 is "unloaded", UserForm 1 is "active" but I cannot simply "Unload Me" again, I get an error.

View 1 Replies View Related

Password Protect Certain Fields Userform

Jul 24, 2006

I have a userform that is used to search and display complaints in the complaint Database. I am trying to achieve following to make it professional:

1. Is it possible to provide users with their own username & password, so that I can give permission to certain users to enter their input. e.g. when a complaint is logged, the owner of the complaint (which will be allocated by me depending on the complaint Category) needs to enter his feedback into a field (a textbox) and close the complaint. I want to give this previlage only to 2-3 nominated users. Every other user will just be able to enter & view complaints.

2. Is is possible to colour code these. Just so that when a user does and a search and views any particular complaint, it will tell him whether that particular complaint is open or closed. So may be closed complaint can have a red complaint number and open ones have a green. Any other ideas for displaying this are also welcome.

View 3 Replies View Related

Userform With Remember Password And User Id Option Or Check Button

Sep 12, 2009

I have userform in excel which asks user to enter user id and password. I want a to have "Remember Me" check button on my userform which will remember user details and he wouldn't have to enter user id and password again and again.

View 14 Replies View Related

Protect And Unprotect All Sheets And Workbook Using Userform Interface And Password

Jul 6, 2012

I am trying to create a way to protect and unprotect all sheets and the worbook by means of a Userform pop up interface.

I have managed to create the Userform but what the code will look like and where to place the VBA code that will make it work, Also i would like to automatically save the sheet/s as i switch between them. so that any updates made to the sheet will be automatically saved when i move to the next sheet and also when i protect or close the workbook.

View 3 Replies View Related

Add A Worksheet To An Existing Spreadsheet Which Has VBA Behind It, But The Worksheet Is Password Protected

Aug 23, 2006

One of my work colleagues need to add a worksheet to an existing Excel Spreadsheet which has VBA behind it, but the worksheet is password protected. The developer who wrote the application has now left, so we have no idea what the password is. Is there anyway of getting round it, like cracking into the spreadsheet to find out the password, or another way?

View 2 Replies View Related

Userform Data Placed In Spreadsheet

Oct 14, 2009

At the moment i've got a userform with 6 text boxes and what I need is when the 'save' button is pressed, all the words from the text boxes is put in 'customers' sheet. I've found this but I just adds data to the top of the current sheet.

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved