Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kane
 
Posts: n/a
Default Sheet protection in mass?!

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   Report Post  
Gord Dibben
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfer data from sheet to sheet Jenn Excel Discussion (Misc queries) 4 January 20th 05 04:07 PM
Sheet Protection Corey Brock Excel Discussion (Misc queries) 1 January 12th 05 07:19 PM
Linking sheets to a summary sheet in workbook gambinijr Excel Discussion (Misc queries) 4 December 16th 04 09:13 PM
linking multiple sheets to a summary sheet greg g Excel Discussion (Misc queries) 1 December 16th 04 08:43 AM
Cell Colors and Sheet Protection cincode5 Excel Discussion (Misc queries) 1 December 3rd 04 11:39 PM


All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"