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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
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,215,463
Messages
6,124,965
Members
449,201
Latest member
Jamil ahmed

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