LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 102
Default 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide and password protect a worksheet Oldjay Excel Discussion (Misc queries) 2 April 30th 08 04:59 PM
Hide a column using a password shapiro Excel Discussion (Misc queries) 2 February 23rd 07 09:05 PM
hide column with password checkQ Excel Discussion (Misc queries) 5 February 11th 07 09:39 PM
hide a column in a worksheet and password protect eoreality Excel Discussion (Misc queries) 1 February 8th 06 02:42 AM
How do I hide a worksheet in Excel and use a password to un-hide . Dchung Excel Discussion (Misc queries) 3 December 2nd 04 06:24 AM


All times are GMT +1. The time now is 09:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"