Protection
for each sh in ActiveWorkbook.Worksheets
sh.Activate
set rng = nothing
if sh.Protectcontents then
sh.Unprotect password:="ABCD"
end if
On error resume next
set rng = sh.SpecialCells(xlFormulas)
On error goto 0
if not rng is nothing then _
rng.locked = True
sh.Protect Password:="ABCD"
Next
--
Regards,
Tom Ogilvy
"Eva Shanley" wrote in message
...
Is there a way to programatically protect all the formulas
in a multiple sheet file, and also not allow row
insertions or deletions? TIA
|