Password Protection

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Is there a way to add password protection to all worksheets (same
password used) within a workbook so that all cells within the workbook
cannot be changed. The workbook has 6 worksheets that are used.

Thanks
 
Tom,

There isn't password protection to limit viewing, but you can protect the
sheets, to prevent changing. Tools - Protection - Protect sheet. The
protection must be applied to one sheet at a time, and can include a
password to prevent a user from unprotecting it. Sort of. If none of the
cells has been unlocked (Format - Cells - Protection), then none can be
changed.
 
Tom

All sheets at once. Not without 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
 
Back
Top