unhide sheet from dropdown list with password

Firasath

Board Regular
Joined
Feb 20, 2011
Messages
134
Office Version
  1. 365
Hi,

I would like to develop a code where I can have a dropdown list of sheet names which I want to unhide with a password. I have tried a lot but got no success. \

Suppose, I have a multiple sheets by names, "A", "B", "C", up to "F". When I select one or multiple sheet names from dropdown box, it should prompt for password to unhide sheet. Please suggest the best way to do so.

Regards.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I have tried below code in the same sheet where dropdown box is there, but nothing is happening. Not getting any error even.

Rich (BB code):
Private Sub Worksheet_Change(ByVal Target As String)
Dim Target As String, msg As Variant

Set Target = Sheets("Sheet1").Range("A1")
Set Target = Target

If Target.Visible = False Then
msg = Application.InputBox("Password", "Password", "", Type:=2)
If response = "pgdb" Then
Target.Visible = True
Target.Select
Else
Target.Visible = False
End If

End Sub
 
Upvote 0
Do all sheets have the same password? What is the name of the sheet that has the drop down list? I assume that this sheet will always be visible. Is this correct?
 
Upvote 0

Forum statistics

Threads
1,215,777
Messages
6,126,838
Members
449,343
Latest member
DEWS2031

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