View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
papou[_7_] papou[_7_] is offline
external usenet poster
 
Posts: 41
Default Protect / Unprotect Sheets

Hello Rob
Sub Protect()
For Each f In Sheets
f.Protect '("pwd") optional if password
Next f
End Sub

Sub Unprotect()
For Each f In Sheets
f.Unprotect '("pwd") optional if password
Next f
End Sub

HTH
Cordially
Pascal

"Rob F" a écrit dans le message de
...
Hi

Can anyone provide two simple macros to protect all sheets
in a workbook, and the opposite - i.e. unprotect all
sheets?

Ideally, I'd then like to move on to designing a form that
lists all the worksheets that I can toggle protection or
or off from. But first things first!

Thanks

Rob F