Thread
:
How do I protect several worksheets at the same time?
View Single Post
#
4
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
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?
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett