How to unlock locked cells by MACRO?!

  • Thread starter =?ISO-8859-2?Q?Petr_N=ECme=E8ek?=
  • Start date
?

=?ISO-8859-2?Q?Petr_N=ECme=E8ek?=

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
 
G

Guest

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!!! :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top