Good morning
I have a Control Form Combo box on several worksheets. From the Combo I can select an upper or lower case lettter and the active cell is coloured accordingly and this works fine. I now wish to add an action for ‘L’ and ‘l’ and have amended the code accordingly (please see below) and I have also changed the Combobox Listfillrange to accomodate the extra entries.
My problem is that if I select the ‘L’ or the ‘l’ from the Combobox it inserts the letter OK but does not change the font or cell colour. I have tried experimenting with different colours but it just does not work, any ideas please
Private Sub Worksheet_Change(ByVal Target As Range) For Each cel In Range("C6:AG1227").Cells If IsError(cel.Value) Then ' do you want to colour these? Else Select Case UCase(cel.Value) Case "H", "h" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 3 Case "S", "s" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 51 Case "M" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 26 Case "P" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 9 Case "U", "u" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 1 Case "A", "a" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 16 Case "B", "b2" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 13 Case "T", "t" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 25 Case "C", "c" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 49 Case "L", "l" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 46 Case "X", "x" cel.Font.ColorIndex = 2 cel.Interior.ColorIndex = 2 Case Else cel.Font.ColorIndex = 1 End Select End If Next cel End Sub