View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Protecting more than one worksheet at a time

Nothing built in but you can do it with a fairly simple macro. I have created
an addin for myself with the code in it to make it easy to do...

Public Sub ProtectAll()
Dim wks As Worksheet
Dim wksAll As Sheets

Application.ScreenUpdating = False
If ActiveWindow.SelectedSheets.Count 1 Then
Set wksAll = ActiveWindow.SelectedSheets
Else
Set wksAll = ActiveWorkbook.Worksheets
End If
On Error Resume Next
For Each wks In wksAll
Select Case Trim(wks.Name)
Case "Start" 'excluded sheet
Case "Main" 'excluded sheet
Case Else
wks.Protect "MyPassword"
End Select
Next wks
Application.ScreenUpdating = True
End Sub
--
HTH...

Jim Thomlinson


"Donnah" wrote:

Is there any way to protect more than one worksheet at a time without have to
right click on each worksheets tab and choose 'Protect Sheet'?