Activate login form for each sheet for different users

royhardware

New Member
Joined
Jan 12, 2018
Messages
6
I have a Workbook with about 90 sheets that will be used by different users at different times, I have created a Home Sheet and a Combobox that will allow user to jump to the sheet they select, I want to create a login form with Username and password for some sheets that only user with password can access.

What I want to achieve is that when users selects a sheet in the combobox, it should prompt for username and password. if the username and password is entered correctly it should take user to the sheet selected, if the username and password is wrong it should display an incorrect password.

I have designed the login userform but the code is beyond me, I intend to have up to 30 different users.

Thanks for the help
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
presuming you want them all to have different passwords, how do you plan to incorporate that ?
 

royhardware

New Member
Joined
Jan 12, 2018
Messages
6
presuming you want them all to have different passwords, how do you plan to incorporate that ?

Each user has his/ her own unique sheet and the user id and password to be set for that specific sheet. Same for all other users
 

royhardware

New Member
Joined
Jan 12, 2018
Messages
6
presuming you want them all to have different passwords, how do you plan to incorporate that ?

I have a code that looks like this:
Private Sub Worksheet_Activate()
MySheet = "OZINEGBE E. BENJAMIN"
If ActiveSheet.Name = MySheet Then
ActiveSheet.Visible = False
Response = InputBox("Enter password to Continue")
If Response = "MyPass" Then
Sheets(MySheet).Visible = True
Application.EnableEvents = False
Sheets(MySheet).Select
Application.EnableEvents = True
End If
End If
Sheets(MySheet).Visible = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

End Sub


The problem am having with the code is that:
1. Password is not masked in "*" when typing it
2. No message incase there is an input password error
3. It does not return to home page if password error

Please help me.
 

Watch MrExcel Video

Forum statistics

Threads
1,128,107
Messages
5,628,720
Members
416,333
Latest member
Time2Learn

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
Top