Поиск

Подсветка текущей ячейки


Private Sub Workbook_SheetSelectionchange(ByVal Sh As Object, ByVal Target As Excel.Range)
    Static OldRa As Range
    On Error Resume Next
    Target.Interior.ColorIndex = 4
    OldRa.Interior.Pattern = xlNone
    Set OldRa = Target
    On Error GoTo 0
End Sub