A
Andy
I have checkboxes ,located in cells J95:J110, that will highlight a range of
cells in a row if it is checked. My range is being highlighted is E95:I110
Everytime the checkbox is checked the specific row range next to it
highlights using conditional formatting.
Currently to get this work i have the checkbox tell a cell next to the
checkbox (cells H95:H110) to be True or False. So if the checkbox is check
the cell next to it is true, and through conditional formatting highlight the
cells. Also if that the checkbox is true, all the other checkboxes are false.
For example, I have a checkbox is J96, if i check it, E96:I96 are
highlighted, all the other checkboxes are false and thoughs ranges are
unhighlighted.
So here is my current code, and i was wondering if there is a faster or more
easier way to write this.
Private Sub CheckBox1_Click()
ActiveSheet.Unprotect
Select Case CheckBox1.Value
Case Is = True
Worksheets("BID RECAP SUMMARY").Range("K93") = "TRUE"
CheckBox2.Value = False
CheckBox3.Value = False
CheckBox4.Value = False
CheckBox5.Value = False
CheckBox6.Value = False
CheckBox7.Value = False
CheckBox8.Value = False
CheckBox9.Value = False
CheckBox10.Value = False
CheckBox11.Value = False
CheckBox12.Value = False
CheckBox13.Value = False
CheckBox14.Value = False
CheckBox15.Value = False
CheckBox16.Value = False
Case Is = False
Worksheets("BID RECAP SUMMARY").Range("K93") = "FALSE"
End Select
ActiveSheet.Protect
End Sub
cells in a row if it is checked. My range is being highlighted is E95:I110
Everytime the checkbox is checked the specific row range next to it
highlights using conditional formatting.
Currently to get this work i have the checkbox tell a cell next to the
checkbox (cells H95:H110) to be True or False. So if the checkbox is check
the cell next to it is true, and through conditional formatting highlight the
cells. Also if that the checkbox is true, all the other checkboxes are false.
For example, I have a checkbox is J96, if i check it, E96:I96 are
highlighted, all the other checkboxes are false and thoughs ranges are
unhighlighted.
So here is my current code, and i was wondering if there is a faster or more
easier way to write this.
Private Sub CheckBox1_Click()
ActiveSheet.Unprotect
Select Case CheckBox1.Value
Case Is = True
Worksheets("BID RECAP SUMMARY").Range("K93") = "TRUE"
CheckBox2.Value = False
CheckBox3.Value = False
CheckBox4.Value = False
CheckBox5.Value = False
CheckBox6.Value = False
CheckBox7.Value = False
CheckBox8.Value = False
CheckBox9.Value = False
CheckBox10.Value = False
CheckBox11.Value = False
CheckBox12.Value = False
CheckBox13.Value = False
CheckBox14.Value = False
CheckBox15.Value = False
CheckBox16.Value = False
Case Is = False
Worksheets("BID RECAP SUMMARY").Range("K93") = "FALSE"
End Select
ActiveSheet.Protect
End Sub