ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing the font color using VBA (https://www.excelbanter.com/excel-programming/330947-changing-font-color-using-vba.html)

magoobee

Changing the font color using VBA
 

I have VBA code that changes the background color of a cell but I woul
also like to change the color of the font.

The code below changes the cell RED but I would also like the fon
WHITE.



code:
--------------------------------------------------------------------------------
Case Cells(CurrRow, 8) < 80
CurrRow = Thing.Row
Range(Cells(CurrRow, 8), Cells(CurrRow, 8)).Select
'Grab column 1 where found
With Selection.Interior
.ColorIndex = 3 '3=red
.Pattern = xlSolid
End With
-------------------------------------------------------------------------------

--
magoobe
-----------------------------------------------------------------------
magoobee's Profile: http://www.excelforum.com/member.php...fo&userid=2158
View this thread: http://www.excelforum.com/showthread.php?threadid=37654


jindon[_13_]

Changing the font color using VBA
 

Hi

Case Cells(CurrRow, 8) < 80
CurrRow = Thing.Row
Range(Cells(CurrRow, 8), Cells(CurrRow, 8)).Select
'Grab column 1 where found
With Selection.Interior
.ColorIndex = 3 '3=red
.Pattern = xlSolid
.Font.ColorIndex=2
End Wit

--
jindo
-----------------------------------------------------------------------
jindon's Profile: http://www.excelforum.com/member.php...fo&userid=1313
View this thread: http://www.excelforum.com/showthread.php?threadid=37654



All times are GMT +1. The time now is 01:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com