Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-10-2018, 07:47 PM
Kenneth Hobson Kenneth Hobson is offline Excel VBA font colour Windows 10 Excel VBA font colour 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
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel VBA font colour Changing Font Colour & Style Tibsen21 Word 4 11-05-2018 03:10 PM
Excel VBA font colour Font colour & highlighting does not work DreamGirl Excel 2 02-13-2012 06:00 AM
Excel VBA font colour Font colour and format changing? Lamya Word 5 05-16-2011 02:35 AM
Font Size & Colour yparuk PowerPoint 0 10-07-2010 12:37 AM
font colour problems darro Outlook 0 11-25-2009 03:50 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft