Hi,
I have used code from a previous Conditional Formatting question which works great, I have changed it to match my needs...nothing amazing I must add. But I am looking to change the text colour to match the interior colour property, so the hole cell is the same colour.
Code is below with my attempt at changing the text colour please correct the line accordingly.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oCell As Range
For Each oCell In Target
Select Case oCell.Value
Case Is = "TM", "tm"
oCell.Interior.Color = RGB(255, 100, 0)
*********oCell.Value.Color = RGB(255, 100, 0)******
Case Is = "SS", "ss"
oCell.Interior.Color = RGB(255, 255, 0)
Case Is = "R", "r"
oCell.Interior.Color = RGB(255, 100, 150)
Case Is = "TR", "tr"
oCell.Interior.Color = RGB(100, 255, 200)
Case Else
oCell.Interior.ColorIndex = xlNone
End Select
Next oCell
End Sub
Many Thanks
Steve
I have used code from a previous Conditional Formatting question which works great, I have changed it to match my needs...nothing amazing I must add. But I am looking to change the text colour to match the interior colour property, so the hole cell is the same colour.
Code is below with my attempt at changing the text colour please correct the line accordingly.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oCell As Range
For Each oCell In Target
Select Case oCell.Value
Case Is = "TM", "tm"
oCell.Interior.Color = RGB(255, 100, 0)
*********oCell.Value.Color = RGB(255, 100, 0)******
Case Is = "SS", "ss"
oCell.Interior.Color = RGB(255, 255, 0)
Case Is = "R", "r"
oCell.Interior.Color = RGB(255, 100, 150)
Case Is = "TR", "tr"
oCell.Interior.Color = RGB(100, 255, 200)
Case Else
oCell.Interior.ColorIndex = xlNone
End Select
Next oCell
End Sub
Many Thanks
Steve