Kai Uwe Schmidt
12/14/2006 8:13:00 PM
Hi,
if you want to change cells´values, you have to unprotect them, yes.
If you want to lock the sheet afterwards again, insert two rows in your
code:
Public Sub changingData
ActiveWorkbook.Worksheets("ProtectedSheet").Unprotect "password"
...
(your code)
...
ActiveWorkbook.("ProtectedSheet").Protect "password"
End Sub
Regards,
Kai
Cologne, Germany
"amirstal" <amirstal@yahoo.com> schrieb im Newsbeitrag
news:1166125184.883438.123430@j72g2000cwa.googlegroups.com...
> Does Excel have a problem running a VBA code when the worksheet is
> protected? If yes, is there a way to overcome it?
>
> Thanks.
>