Unlocking Cells

  • Thread starter Thread starter Sisilla
  • Start date Start date
S

Sisilla

The cell that is not being changed is my cell link for my
drop-down. The other cells are being changed even if the
sheet has been protected. I believe that this might be due
to the fact that my cell link is changed as soon as the
drop-down is clicked, and before the macro is run; the
sheet is therefore protected and the cell locked at that
time. The only option I can think of is to place my cell
link on a different sheet since the user does not have to
see this information. Are there any other options? I
really would not like to have to create another sheet for
my cell link. I appreciate any help.

Thanks,
Sisilla


----Original Message-----
 
If you are trying to unlock the cell that is linked to a control when the
control fires its click or change event, then it probably is being changed,
like all the others, but after the fact as you describe.

You can unlink you cell and use your code to set the value.

Don't know what type of control you are using, so can't say what the propert
code would be but lets say a combobox from the control toolbox toobar

Private Sub Combobox1_Click()
Activesheet.Protect UserInterfaceOnly:=True
Range("B9").Value = Combobox1.Value
End Sub

I would have already cleared the linked cell entry in the properties window.

Activesheet.Protect UserInterfaceOnly:=True requires a password argument
if a password is assigned in Excel 2002 - but not in earlier versions.

Regards,
Tom Ogilvy
 
Back
Top