I use this code to highlight the sheet's active cell:
that I found here.VB Code:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range) Static OldRange As Range On Error Resume Next Target.Interior.ColorIndex = 6 ' yellow - change as needed OldRange.Interior.ColorIndex = xlColorIndexNone Set OldRange = Target End Sub
All the cells in my sheet are white (default) except for a few in various other colours. Anyone knows how to modify the code so that the old colour is restablished after the cell is no longer actove?




Reply With Quote