Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I protect several worksheets at the same time?

I have several worksheets that have similar formats and information. One for
each day of the month. I have locked the same groups of cells in each
worksheet and left certain groups of cells unlocked so users can update the
sheets daily. Now I would like to turn on worksheet protection but it seems
I have to turn on protection one sheet at a time. Is there any way to turn
protection on and off for several or all sheets at once?
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default How do I protect several worksheets at the same time?

You can do it with a macro. This one assumes all sheets have the same password.

Sub MsgBoxAllMySheets()
Dim sht As Worksheet
For Each sht In Sheets
sht.Select
sht.Protect Password:="mypassword"
Next sht
End Sub

Mike

"JohnH240" wrote:

I have several worksheets that have similar formats and information. One for
each day of the month. I have locked the same groups of cells in each
worksheet and left certain groups of cells unlocked so users can update the
sheets daily. Now I would like to turn on worksheet protection but it seems
I have to turn on protection one sheet at a time. Is there any way to turn
protection on and off for several or all sheets at once?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I protect several worksheets at the same time?

Thank you both. I don't know how to do these things yet, but like everything
else in MS Office, expecially Excel, I guess I will dig into the help files
and figure it out, or browse through the training on MSN. Seems like I've had
to keep learning something new since the late 70's and my first round with
punch cards!
Thanks again.
Anyone want to give a short primer on where to start with macros? If not, no
problem.

"Don Guillett" wrote:

and you should be able to do it withOUT the selections

Sub MsgBoxAllMySheets()
Dim sht As Worksheet
For Each sht In Sheets


if sht.name<"Main" then sht.Protect Password:="mypassword"

Next sht
End Sub



--
Don Guillett
SalesAid Software

"Mike" wrote in message
...
You can do it with a macro. This one assumes all sheets have the same
password.

Sub MsgBoxAllMySheets()
Dim sht As Worksheet
For Each sht In Sheets
sht.Select
sht.Protect Password:="mypassword"
Next sht
End Sub

Mike

"JohnH240" wrote:

I have several worksheets that have similar formats and information. One
for
each day of the month. I have locked the same groups of cells in each
worksheet and left certain groups of cells unlocked so users can update
the
sheets daily. Now I would like to turn on worksheet protection but it
seems
I have to turn on protection one sheet at a time. Is there any way to
turn
protection on and off for several or all sheets at once?






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I protect several worksheets at the same time?

John

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 or edit the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


On Thu, 1 Mar 2007 07:28:10 -0800, JohnH240
wrote:

Thank you both. I don't know how to do these things yet, but like everything
else in MS Office, expecially Excel, I guess I will dig into the help files
and figure it out, or browse through the training on MSN. Seems like I've had
to keep learning something new since the late 70's and my first round with
punch cards!
Thanks again.
Anyone want to give a short primer on where to start with macros? If not, no
problem.

"Don Guillett" wrote:

and you should be able to do it withOUT the selections

Sub MsgBoxAllMySheets()
Dim sht As Worksheet
For Each sht In Sheets


if sht.name<"Main" then sht.Protect Password:="mypassword"

Next sht
End Sub



--
Don Guillett
SalesAid Software

"Mike" wrote in message
...
You can do it with a macro. This one assumes all sheets have the same
password.

Sub MsgBoxAllMySheets()
Dim sht As Worksheet
For Each sht In Sheets
sht.Select
sht.Protect Password:="mypassword"
Next sht
End Sub

Mike

"JohnH240" wrote:

I have several worksheets that have similar formats and information. One
for
each day of the month. I have locked the same groups of cells in each
worksheet and left certain groups of cells unlocked so users can update
the
sheets daily. Now I would like to turn on worksheet protection but it
seems
I have to turn on protection one sheet at a time. Is there any way to
turn
protection on and off for several or all sheets at once?





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
Is it possible to protect multiple worksheets at the same time Terrie Excel Worksheet Functions 1 October 18th 06 08:06 PM
can you protect multiple worksheets at thr same time mlpmlb Excel Discussion (Misc queries) 1 October 13th 06 05:22 AM
how do i protect all worksheets in a workbook at one time Dennis Excel Discussion (Misc queries) 0 November 2nd 05 05:32 PM
how do i protect multiple worksheets Dennis Excel Discussion (Misc queries) 2 October 31st 05 11:41 PM
How can I protect worksheets in one go? Lincie L. Excel Worksheet Functions 1 August 6th 05 06:11 PM


All times are GMT +1. The time now is 08:41 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"