K
KJ-clueless
I have the following code:
Sub Test1()
Dim MyRange As Range
Dim MyColor As Integer
Dim MyCell As Integer
'' set range = to selected cells ''
Set MyRange = Selection
'' evaluate the value and apply to appropriate text color ''
For Each c In MyRange
c.Select
MyCell = ActiveCell.Value
Select Case MyCell
Case 0
Selection.Font.ColorIndex = 0
Case Else
Selection.Font.ColorIndex = 3
End Select
Next
End Sub
This code works fabulously, however, I would like to set the font colorindex
to the same value as the interior color index if the cell value is 0. Is
this possible, and how would I go about this ?
Sub Test1()
Dim MyRange As Range
Dim MyColor As Integer
Dim MyCell As Integer
'' set range = to selected cells ''
Set MyRange = Selection
'' evaluate the value and apply to appropriate text color ''
For Each c In MyRange
c.Select
MyCell = ActiveCell.Value
Select Case MyCell
Case 0
Selection.Font.ColorIndex = 0
Case Else
Selection.Font.ColorIndex = 3
End Select
Next
End Sub
This code works fabulously, however, I would like to set the font colorindex
to the same value as the interior color index if the cell value is 0. Is
this possible, and how would I go about this ?