View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default How do I protect several worksheets at the same time?

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?