Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a worksheet whose cells have different interior colors. When I select
a cell, I want to change the interior color to 35. When I move on to another cell, I want to change that color back to its original color. I found the following code to make the intial change, but haven't figured out how to return the original color. Thanks for helping. --------------------------------- Option Explicit Dim OldActiveCell As Range Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _ ByVal Target As Excel.Range) If OldActiveCell Is Nothing Then Set OldActiveCell = Target Else OldActiveCell.Interior.ColorIndex = xlNone End If Target.Interior.ColorIndex = 35 Set OldActiveCell = Target End Sub -- Ken Hudson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to change the default interior color palette index in Excel 2003 | Excel Programming | |||
Cell background color (interior color) setting not working | Excel Programming | |||
Change the interior color of a cell - Code Review | Excel Programming | |||
interior color of a cell | Excel Programming |