Hello, I am having difficulty get this macro to work correctly, does anyone see my problem? I would like to high light the active cell yellow (or range) when I click on it or arrow to a cell. Then when I move off of the cell, I would like to restore its original attributes. It seems I would record the original attributes, highlight it yellow, and when I move off the cell restore the attributes. The code changes the cell yellow; however, it does not restore the original color. I have a few lines of code I have messaged out because they do not work. I would appreciate any help you could give me. Thanks Redsab
Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Static xLastRng As Range
Dim SaveColor As Long
On Error Resume Next
'SaveColor = ActiveCell.Interior.Color
Target.Interior.ColorIndex = 6
xLastRng.Interior.ColorIndex = SaveColor 'xlColorIndexNone
Set xLastRng = Target
'ActiveCell.Interior.Color = SaveColor
End Sub
Bookmarks