Protecting multiple worksheets.

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!!!!!!!!!
 
G

Guest

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
 
G

Gord Dibben

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
 

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

Top