We will assume you have used the password "Lock" to protect your sheet.
Use this code:
ActiveSheet.UnProtect Lock
'your code here
ActiveSheet.Protect Lock
of course, adjust the password to meet your needs.
Reminder: passwords on sheets only stop someone from inadvertantly
changing data. Any one so inclined can break an Excel password in a
matter of a few minutes!
HTH
Bruce
--
swatsp0p
------------------------------------------------------------------------
swatsp0p's Profile:
http://www.excelforum.com/member.php...o&userid=15101
View this thread:
http://www.excelforum.com/showthread...hreadid=393973