How to unlock locked cells by MACRO?!

P

Petr Nìmeèek

I have locked Sheet and I need to change particular cells. But when my
macro wants to change it => ERROR :/
Is there any way to unprotect these particulary cells by macro and
change them? - after that action, of course, I want to lock them again.
Please help me, Pedro
 
D

Dave Peterson

Just unprotect the sheet, do the work, and reprotect the sheet. Kind of like:

activesheet.unprotect password:="yourpassword"
'your code to change stuff
activesheet.protect password:="yourpassword"
 
D

davesexcel

use your macro recorder, check out the code for unlocking maybe it will
work
 
P

Petr NÄ›meÄek

Dave Peterson napsal(a):
Just unprotect the sheet, do the work, and reprotect the sheet. Kind of like:

activesheet.unprotect password:="yourpassword"
'your code to change stuff
activesheet.protect password:="yourpassword"
Thanks!!! :)
 
Top