VBA Code - UseName and Password validation and navigate to New Sheet

shrikark

New Member
Joined
Mar 20, 2018
Messages
3
Hi,

I have 3 sheets in a Workbook named in the brackets.
1. The main LOGIN sheet(Login)
2. Second sheet containing list of 101 usernames and passwords in column A and Column B respectively (Admin)
3. The sheet which you navigate to after logging in successfully. (Metric)

I need a VBA code to perform the below actions:
1. Input for username and Password
2. Validate if the Username and password is right by checking the sheet 'Admin' of the worksheet
3. If the Login details are valid, then navigate(open) to the sheet 'Metric'.
4. If the Login details are not valid, then pop up a MsgBox prompting "Invalid Credentials"
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi,
welcome to forum

Have a look at tutorial provided here:http://www.onlinepclearning.com/excel-userform-login/

and see if it does what you want.

As an alternative suggestion if your workbook is on your network you could validate users with their Network UserName negating need to login.

Others here may offer further suggestions.

Dave
 
Last edited:
Upvote 0
you DO want the sheet of usernames, (to show they are authorized for this)
but couldnt the users use their existing Windows login? this way you dont store passwords, and they are authenticated via Windows.
 
Upvote 0
you DO want the sheet of usernames, (to show they are authorized for this) - This would be tedious
but couldnt the users use their existing Windows login? this way you dont store passwords, and they are authenticated via Windows - This seems better. Is there a way to do this?
 
Upvote 0
you DO want the sheet of usernames, (to show they are authorized for this) - This would be tedious
but couldnt the users use their existing Windows login? this way you dont store passwords, and they are authenticated via Windows - This seems better. Is there a way to do this?
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top