If you have multiple worksheets in a workbook is there a way of protecting all sheets in one go or do you have to protect all individually?
If you have multiple worksheets in a workbook is there a way of protecting all sheets in one go or do you have to protect all individually?
Hi
Not as far as i know, but if you have macros enabled you can use two macros:
Sub Macro1()
Sheets("Sheet1").Select
ActiveSheet.Protect "Music"
Sheets("Sheet2").Select
ActiveSheet.Protect "Music"
Sheets("Sheet3").Select
ActiveSheet.Protect "Music"
Sheets("Sheet1").Select
End Sub
Sub macro2()
Sheets("Sheet1").Select
ActiveSheet.Unprotect "Music"
Sheets("Sheet2").Select
ActiveSheet.Unprotect "Music"
Sheets("Sheet3").Select
ActiveSheet.Unprotect "Music"
Sheets("Sheet1").Select
End Sub
Hope it helps
JR
Versions
Mac OS X 'Leopard'
Mac MS Office Excel 2004
Windows XP
MS Excel 2002
MS Excel 2003
more simplfied and more generic use the following
Sub wsprotect()
For Each ws In Worksheets
ws.Protect "test"
Next
End Sub
Sub wsunprotect()
For Each ws In Worksheets
ws.Unprotect "test"
Next
End Sub
replace the part "test" with whatever password you want. this will protect and unprotect each sheet in the workbook no matter what their name is.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks