Thread: [Solved] Excel VBA font colour
View Single Post
 
Old 12-10-2018, 07:47 PM
Kenneth Hobson Kenneth Hobson is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Jun 2018
Posts: 37
Kenneth Hobson is on a distinguished road
Default

Code:
Sub FontRedOrBlack()
  Dim c As Range
  Set c = [a1]
  With c
    Select Case .Font.Color
      Case vbRed
        .Font.Color = vbBlack
      Case Else
        .Font.Color = vbRed
    End Select
  End With
End Sub
Reply With Quote