Protecting multiple worksheets.

  • Thread starter Thread starter Superjet
  • Start date Start date
S

Superjet

I am using Excel XP.

I have a workbook with 12 worksheets, 1 for each month of the year.
Each worksheet has a timesheet used to report hours. Each of the
twelve timesheets is exactly the same.

To protect each sheet, I go into each sheet and apply the
Tools/Protection/Protect Sheet approach. I have to repeat this 12
times to protect them and then 12 times to unprotect them.

My question is "Is there a faster way to apply and remove worksheet
protection?

Appreciate your help!!!!!!!!!
 
You could create a Macro or add Protect Sheet command to your toolbar. Right
click on toolbar area. Left click on customize>command tab>tools. Scroll to
find protect sheet and click and drag to toolbar. Not as fast as a macro but
it works for me.

TC
 
Only through vba macro.

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
 
Back
Top