B
Brian Matlack
Hi!
I got this code off of one of Chip Pearsons sites and it works great o
a white sheet.
Is there a way to modify it so that:
1. If I have a cell colored Red and I select it and then move on t
another cell the Red cell is now White. I want the cells to revert bac
to whatever their original color was.
2. Can I effect the Font Color as well as the background color an
still have them revert back to the original settings.
<start code>
Option Explicit
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVa
Target As Excel.Range)
Static OldCell As Range
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 6 'Yellow
Set OldCell = Target
End Sub
<end code>
Thanks for your time and help
I got this code off of one of Chip Pearsons sites and it works great o
a white sheet.
Is there a way to modify it so that:
1. If I have a cell colored Red and I select it and then move on t
another cell the Red cell is now White. I want the cells to revert bac
to whatever their original color was.
2. Can I effect the Font Color as well as the background color an
still have them revert back to the original settings.
<start code>
Option Explicit
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVa
Target As Excel.Range)
Static OldCell As Range
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 6 'Yellow
Set OldCell = Target
End Sub
<end code>
Thanks for your time and help