View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
ladytiger7481 ladytiger7481 is offline
external usenet poster
 
Posts: 4
Default Password Protection

I have spreadsheets with multiple tabs - I presently have to password protect
each tab separately. I also have ranges within these spreadsheets that need
to be able to be unlocked with a different password. I'm looking for a way to
write a macro to be able to do this to all the spreadsheets with one click. I
have already found how to just password protect with a macro, but can someone
please show me how to add the ablity to allow user to edit ranges in the
macro. This is the macro I am presently using....

Sub Protect_All_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect Password:="123"
Next ws
End Sub

Thanks so much for any help!