Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to highlight the current cell with a color say gray and set the color
of the last cell I was at back to what it currently was. The code below does not work. It sets the previous cell color to white and if the cell color was something other than white, say green, I lose the color green for the previous cell. Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static OldRange As Range 'Set backcolor to whatever, change as needed Target.Interior.ColorIndex = 15 'light gray OldRange.Interior.ColorIndex = xlColorIndexNone Set OldRange = Target End Sub -- Dave B. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Row select mode to highlight active row of active cell | Excel Discussion (Misc queries) | |||
Active Cell Highlight | Excel Discussion (Misc queries) | |||
Active cell highlight | Excel Discussion (Misc queries) | |||
How do I highlight the active cell in a spreadsheet? | Excel Programming | |||
Highlight Active Cell | Excel Discussion (Misc queries) |