View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Jane Jane is offline
external usenet poster
 
Posts: 202
Default How do I lock several sheets

You're right: It can be fun - especially when it works!!
--
Jane


"Bernard Liengme" skrev:

This pair of subroutines with protect/Unprotect all the worksheets in the
current book. Unfamiliar with VBA? It really can be fun. See David
McRitchie's site on "getting started" with VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Sub LockDown()
For Each ws In Worksheets
ws.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Next
End Sub

Sub UnlockAll()
For Each ws In Worksheets
ws.Unprotect
Next
End Sub

--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Jane" wrote in message
...
I have a spredsheet with 100 identical sheets, and I like to lock/protect
all
the sheets. Is it possible to do this in a simple way instead of that I
have
to lock each of them.
--
Jane