Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Password to Unhide VeryHidden Sheets
Code is not working; must be due to the If...Then. I'm tired now and can't
see the error in the logic. Can someone point out the mistake? Private Sub CommandButton1_Click() Dim i_pwd As String Dim pwd As String '#1 If pwd = "showandy" Then i_pwd = InputBox("Please Enter Password to Unhide Sheet", "Unhide Sheet...") Select Case i_pwd Case pwd Worksheets("Andy").Visible = True Sheets("Andy").Select Case Else MsgBox "Incorrect password; no action taken.", vbInformation, "Unhide Sheet..." End Select End If Exit Sub '#2 If pwd = "showchris" Then i_pwd = InputBox("Please Enter Password to Unhide Sheet", "Unhide Sheet...") Select Case i_pwd Case pwd Worksheets("Chris").Visible = True Sheets("Chris").Select Case Else MsgBox "Incorrect password; no action taken.", vbInformation, "Unhide Sheet..." End Select End If Exit Sub '#3 If pwd = "showdavid" Then i_pwd = InputBox("Please Enter Password to Unhide Sheet", "Unhide Sheet...") Select Case i_pwd Case pwd Worksheets("David").Visible = True Sheets("David").Select Case Else MsgBox "Incorrect password; no action taken.", vbInformation, "Unhide Sheet..." End Select End If Exit Sub End Sub Regards, Ryan--- -- RyGuy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unhide All VeryHidden Sheets in a workbook (w/o naming them) | Excel Programming | |||
Please help me find veryhidden sheets | Excel Programming | |||
Validation OK to named ranges in Veryhidden sheets? | Excel Programming | |||
Password to hide and unhide sheets | Excel Programming | |||
Password to hide and unhide sheets | Excel Programming |