For the first part, you could do something like this:
VB Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim intSelSheet As Integer ' Check the cell to see if it's fill colour's changed to red, ' If so, set the 1st checkbox to on. If Range("F3").Interior.ColorIndex = 3 Then chkCellColour1.Value = True chkCellColour2.Value = False ' Otherwise, check if it's blue & set the other checkbox ' (turning the first checkbox value to off). ElseIf Range("F3").Interior.ColorIndex = 5 Then chkCellColour1.Value = False chkCellColour2.Value = True ' Finally, if the cell has bot been filled with blue ' or red, turn both checkboxes to off. Else chkCellColour1.Value = False chkCellColour2.Value = False End If End Sub
Just change the "Interior.ColorIndex" bit to read "Font.ColorIndex" depending on whether you're checking the fill or the font colour of the cell...




Reply With Quote