Home |
Search |
Today's Posts |
#1
|
|||
|
|||
macros to hide sheet with protection
hi everyone
I want to have a macros to hide sheet 1 Scenario I am on sheet 2 I click on a command button and I get the message box for unprotect sheet, I put the password and click ok Sheet 1 is unhide if I click on cancel I stay on sheet 2 ,when password is ok and when I am on sheet 2 I have another command button when I click on I return on Sheet 1 and sheet 2 is hiding again with the protection. Thnxs very much for ur precious help Bakar Last edited by Bakar : October 27th 12 at 11:20 AM Reason: Solved |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macros to hide sheet with protection
Bakar,
Copy this to a new module, then add a button to sheet1 that links to the "ReHide" macro and a button to sheet2 that links to the "UnHide" macro. You set your password with the very first line of the module, so you may want to password protect the module as well. Here is the code: Const pWord As String = "Hello123" Sub UnHide() If InputBox("Please enter password to open worksheet", "Password?", _ "Enter Password") = pWord Then Sheet1.Visible = xlSheetVisible Sheet1.Activate End If End Sub Sub ReHide() Sheet1.Visible = xlSheetVeryHidden End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Data Protection Best Practice: AKA: Real Sheet Protection | Excel Discussion (Misc queries) | |||
Excel Data Protection- AKA: Sheet/Macro Password Protection | Setting up and Configuration of Excel | |||
how to hide a list of macros in excel 2000 without password protection | Setting up and Configuration of Excel | |||
how to hide a list of macros without password protection | Excel Worksheet Functions | |||
have macros complete and enter passwords for sheet protection. | Excel Programming |