tHENKs Dominic
This one is working perfectly too!
"dominicb" wrote:
Good morning Henk Frigge
This code will do what you're asking.
Sub ProtSheets()
For Each WkSht In Worksheets
WkSht.Protect password:="password"
Next WkSht
End Sub
Note that for simplicity I have omitted some of the optional settings
that can be used in th third "Protect" line. (In XL2000
(DrawingObjects:=True, Contents:=True, Scenarios:=True but in XL
2002/2003 around a dozen other optional settings)
HTH
DominicB
--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=383063