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
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
presuming you want them all to have different passwords, how do you plan to incorporate that ?
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,220
Members
448,876
Latest member
Solitario

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