Unprotect multiple sheets at once.

  • Thread starter Thread starter Naseralabbas
  • Start date Start date
N

Naseralabbas

How to unprotect multiple sheets. When selecting multiple protected
sheets in excell 2002, the " unprotect sheet " is not active. Is there
a way to do it.
 
One at a time or use a macro

for each ws in worksheets
ws. unprotect
next ws
 
Only through VBA.

Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Protect password:="justme"
Next n
Application.ScreenUpdating = True
End Sub

Sub UnprotectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Unprotect password:="justme"
Next n
Application.ScreenUpdating = True
End Sub

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top