ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Multiple Worksheet Protection (https://www.excelbanter.com/excel-discussion-misc-queries/112236-multiple-worksheet-protection.html)

lee

Multiple Worksheet Protection
 
I have a workbook that has multiple worksheets with the same format. Is
there a way to protect cells on these multiple worksheets at the same time.
The group feature does not work for this and having to do each worksheet
separately is very timeconsuming

Gord Dibben

Multiple Worksheet Protection
 
Lee

Grouping sheets to select cells is not a problem, but the protecting of grouped
sheets must be VBA assisted.

Group the sheets to select the cells to be locked or unlocked on all sheets.

Ungroup when done.

Then run this macro to protect all sheets.

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

And to unprotect all sheets.

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 Fri, 29 Sep 2006 12:19:02 -0700, Lee wrote:

I have a workbook that has multiple worksheets with the same format. Is
there a way to protect cells on these multiple worksheets at the same time.
The group feature does not work for this and having to do each worksheet
separately is very timeconsuming




All times are GMT +1. The time now is 04:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com