View Single Post
  #2   Report Post  
William
 
Posts: n/a
Default

Hi Janna

Sub UnprotectAll()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Unprotect Password:="whatever"
Next ws
End Sub

Sub ProtectAll()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Protect Password:="whatever"
Next ws
End Sub


--
XL2002
Regards

William



"Janna" wrote in message
...
| Is there a way to easily unprotect all the worksheets in a workbook? For
| example, I have a workbook with 20 worksheets (one for each employee).
The
| worksheets have been individually protected (except for the select cells
into
| which I enter data. Now with the new year, I would like to unprotect all
the
| worksheets so I can change the (previously protected) field that contains
| the year and then reprotect all the worksheets. Thanks.