![]() |
password prompt to unhide sheet
Scenario:
I have a a button that when pressed unhides Sheet X. What I would like to do is actually require a password prompt when that button is pressed; thereby requiring that the user know the password before accessing that particular hidden sheet. Is this possible, and if so, what would the VBA code look like? |
password prompt to unhide sheet
Sure
Sub tester() Dim S As String S = InputBox("Password:") Select Case S Case "" Case "*****" Sheets(1).Visible = True Case Else MsgBox "Wrong password.", vbInformation End Select End Sub HTH. Best wishes Harald "Jeff" skrev i melding ... Scenario: I have a a button that when pressed unhides Sheet X. What I would like to do is actually require a password prompt when that button is pressed; thereby requiring that the user know the password before accessing that particular hidden sheet. Is this possible, and if so, what would the VBA code look like? |
All times are GMT +1. The time now is 04:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com