Dealing with a Locked Cell


C

Craig

Hi there, I'm having trouble with unprotecting a worksheet then changing a
cells value to locked or unlocked?

I'm using this:

sheet1.unprotect
sheet1.Range("A1").locked=False
if(sheet2.Range("B200").value = "Apples" then
sheet1.Range("A1").value=""
sheet1.Range("A1").locked=True
end if
sheet1.protect
this is just an example... but seems to error with the .locked=true or false
Any Ideas?

Thanks in advance

Craig
 
Ad

Advertisements

C

Craig

Hey... Sorry for wasting space, I solved my problem. Appearently I was
dealing with merged cells.
I needed to specify range("A1:A3").locked =?
till we me again!
Craig
 
Ad

Advertisements


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