Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 33
Default Are there ways to protect multiple sheets at once?

I have created a report for our company that covers each day of the month - a
31 page workbook. It looks great, but I now need to protect it. I realize
that I can protect it one worksheet at a time, but this is a bit tedious. I
also know that I can protect the entire workbook from having pages deleated.
What I need to do is protect each page individually, using the same password,
so that none of the formulas are lost. Is there a way to do all 31 sheets at
once or do I have to each of the individually? Thanks.
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,501
Default Are there ways to protect multiple sheets at once?

Hi,

I'm afraid you have to resort to VB but it's not complicated.
Alt+F11 to open VB editor
right click 'This Workbook' and insert module
Paste these 2 Subs in.

To run then from your worksheet
Tools|Macro|Macros
Select 'This Workbook'
Highlight the macro name and click run

Sub marine()
For x = 1 To Worksheets.Count
Worksheets(x).protect Password:="Mypass"
Next
End Sub

Sub marine1()
For x = 1 To Worksheets.Count
Worksheets(x).Unprotect Password:="Mypass"
Next
End Sub

Mike

"Monty" wrote:

I have created a report for our company that covers each day of the month - a
31 page workbook. It looks great, but I now need to protect it. I realize
that I can protect it one worksheet at a time, but this is a bit tedious. I
also know that I can protect the entire workbook from having pages deleated.
What I need to do is protect each page individually, using the same password,
so that none of the formulas are lost. Is there a way to do all 31 sheets at
once or do I have to each of the individually? Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default Are there ways to protect multiple sheets at once?

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 MS Excel MVP

On Thu, 29 May 2008 11:53:00 -0700, Monty
wrote:

I have created a report for our company that covers each day of the month - a
31 page workbook. It looks great, but I now need to protect it. I realize
that I can protect it one worksheet at a time, but this is a bit tedious. I
also know that I can protect the entire workbook from having pages deleated.
What I need to do is protect each page individually, using the same password,
so that none of the formulas are lost. Is there a way to do all 31 sheets at
once or do I have to each of the individually? Thanks.


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
Protect some sheets in an xls but not all. lucky1 Excel Worksheet Functions 0 June 6th 07 09:05 PM
Macro to protect multiple sheets? Stilla Excel Worksheet Functions 12 March 5th 07 07:03 PM
How do I protect multiple sheets at one time? Kelly Excel Worksheet Functions 1 February 27th 06 04:30 PM
Protect all Sheets Phil Osman Excel Discussion (Misc queries) 0 June 17th 05 01:55 AM
How do I protect formula cells on multiple sheets? Webdiva Excel Worksheet Functions 0 May 3rd 05 08:29 PM


All times are GMT +1. The time now is 03:39 AM.

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"