jay20aiii
04-05-2012, 10:21 AM
I can set the Background color of a range of cells like this:
Sub SetColor()
For Each c In Worksheets("Sheet1").Range("A10:A20").Cells
c.Interior.ColorIndex = 3
Next
End Sub
I can't figure out howto set the font color though.. I tried
c.Interior.Font.ColorIndex = 3
But I get an error about that property not being supported which I presume means it does not exist or cannot be set in this way?
Sub SetColor()
For Each c In Worksheets("Sheet1").Range("A10:A20").Cells
c.Interior.ColorIndex = 3
Next
End Sub
I can't figure out howto set the font color though.. I tried
c.Interior.Font.ColorIndex = 3
But I get an error about that property not being supported which I presume means it does not exist or cannot be set in this way?