I used the following code to create a macro to protect/unprotect all sheets at once. It is working fine, but now I need to exclude one sheet (called "summary") from this process so that the "summary"sheet must be protected/unprotected separately. I tried changing the password of the "summary" sheet, but then the macro would not run for the other sheets.
Here is the current code:
Sub Protect()
Dim i As Integer
For i = 1 To Worksheets.Count
Sheets (i) .Protect "MyPassword"
Next
End Sub
Sub UnProtect()
Dim i As Integer
For i = 1 To Worksheets.Count
Sheets (i) .UnProtect "MyPassword"
Next
End Sub
Thanks
Here is the current code:
Sub Protect()
Dim i As Integer
For i = 1 To Worksheets.Count
Sheets (i) .Protect "MyPassword"
Next
End Sub
Sub UnProtect()
Dim i As Integer
For i = 1 To Worksheets.Count
Sheets (i) .UnProtect "MyPassword"
Next
End Sub
Thanks