View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Craig[_21_] Craig[_21_] is offline
external usenet poster
 
Posts: 39
Default Dealing with a Locked Cell

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