Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
XL2k,sp3
I have 12 worksheets in a workbook that is book and sheet protected for many reasons. Is it possable to unprotect / protect ALL sheets at once, to allow maintenance/upgrade's to the cell contents? Certainly would make it easier than to have to unlock and lock each sheet. Tks .... Kane |
#2
![]() |
|||
|
|||
![]()
Kane
Only through 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 If not familiar with VBA and macros, see David McRitchie's site for more on "getting started". http://www.mvps.org/dmcritchie/excel/getstarted.htm In the meantime.......... First...create a backup copy of your original workbook. To create a General Module, hit ALT + F11 to open the Visual Basic Editor. Hit CRTL + R to open Project Explorer. Find your workbook/project and select it. Right-click and InsertModule. Paste the code in there. Save the workbook and hit ALT + Q to return to your workbook. Run the macro by going to ToolMacroMacros. Gord Dibben Excel MVP On Tue, 11 Jan 2005 22:21:04 -0800, "Kane" wrote: XL2k,sp3 I have 12 worksheets in a workbook that is book and sheet protected for many reasons. Is it possable to unprotect / protect ALL sheets at once, to allow maintenance/upgrade's to the cell contents? Certainly would make it easier than to have to unlock and lock each sheet. Tks .... Kane |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Transfer data from sheet to sheet | Excel Discussion (Misc queries) | |||
Sheet Protection | Excel Discussion (Misc queries) | |||
Linking sheets to a summary sheet in workbook | Excel Discussion (Misc queries) | |||
linking multiple sheets to a summary sheet | Excel Discussion (Misc queries) | |||
Cell Colors and Sheet Protection | Excel Discussion (Misc queries) |