View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Are there ways to protect multiple sheets at once?

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 MS Excel MVP

On Thu, 29 May 2008 11:53:00 -0700, Monty
wrote:

I have created a report for our company that covers each day of the month - a
31 page workbook. It looks great, but I now need to protect it. I realize
that I can protect it one worksheet at a time, but this is a bit tedious. I
also know that I can protect the entire workbook from having pages deleated.
What I need to do is protect each page individually, using the same password,
so that none of the formulas are lost. Is there a way to do all 31 sheets at
once or do I have to each of the individually? Thanks.