For Each Cell In Activesheet.UsedRange
cell.Locked = Not cell.Hasformula
Next cell
Activesheet.Protect
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"tanktata" wrote in
message ...
I am trying to create a macro that will search through a range and
protect any cells that contain formulas of any type.
Can anyone help?
Thanks.
--
tanktata
------------------------------------------------------------------------
tanktata's Profile:
http://www.excelforum.com/member.php...fo&userid=4598
View this thread: http://www.excelforum.com/showthread...hreadid=559103