View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Protection macro

You would have to write one.

This protects all sheets if they are unprotected and vice versa. Simply call
it from your sub

Sub sistence()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.ProtectContents Then
ws.Unprotect Password:="MyPass"
Else
ws.Protect Password:="MyPass"
End If
Next
End Sub

Mike

"Neil Pearce" wrote:

Is there a macro that will automatically unprotect all worksheets when any
other marco is run?

More porblematic one would assume is a macro that automatically protects all
worksheets when another macro ends?