Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
How to set password for multiple worksheet and to hide ?
How am I to set different password for different worksheet ? This to allow
certain person to see only certain worksheet when clicking on one password "123". I'm new Macro. Your guidance please |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
How to set password for multiple worksheet and to hide ?
Ok, you are going to write down all your passwords first?
Sub ProtectAllSheets() Dim wks As Worksheet, Pswd As String Pswd = "mypassword" 'change to your one For Each wks In ActiveWorkbook.Worksheets wks.Protect Password:=Pswd & wks.Index Next wks End Sub To Unprotect: Sub UnProtectAllSheets() Dim wks As Worksheet, Pswd As String Pswd = "mypassword" 'use your password For Each wks In ActiveWorkbook.Worksheets wks.Unprotect Password:=Pswd & wks.Index Next wks End Sub Paste these 2 into a new code module (Alt + F11 and insert module) Then to run them Alt + F8 will show them, under Options there you can create a short cut key combination. Regards Robert McCurdy "Mah" wrote in message ... How am I to set different password for different worksheet ? This to allow certain person to see only certain worksheet when clicking on one password "123". I'm new Macro. Your guidance please |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide and password protect a worksheet | Excel Discussion (Misc queries) | |||
Hide a column using a password | Excel Discussion (Misc queries) | |||
hide column with password | Excel Discussion (Misc queries) | |||
hide a column in a worksheet and password protect | Excel Discussion (Misc queries) | |||
How do I hide a worksheet in Excel and use a password to un-hide . | Excel Discussion (Misc queries) |