Protecting a Combo Box

K

Katie

I am doing a form and I am using combo boxes. I protected
the sheet and I am still able to change the combo boxes. I
right clicked on the combo box and I went to format
control and I locked it there also, but IT WON'T LOCK!!
What am I doing wrong?
 
D

Dave Peterson

If you add a "linkedcell" (for the combobox from the control toolbox toolbar) or
a "cell link" (for a dropdown from the forms toolbar), you can lock that cell.

Then when the worksheet is protected, you won't be able to update that cell via
the combobox/dropdown.

And if you protect the worksheet in code, you could disable either:

Option Explicit
Sub testme()
With Worksheets("sheet1")
.Protect Password:="hi"
.ComboBox1.Enabled = False
.DropDowns("drop down 1").Enabled = False
End With
End Sub

or even make them invisible--
..visible = false
 
Top