Home > other >  Highlighting active Cells
Highlighting active Cells

Time:06-30

I saw a code on a site, where it highlights the active cell .

The code is,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Cells.Interior.ColorIndex = xlColorIndexNone
    Target.EntireColumn.Interior.ColorIndex = 20
    Target.EntireRow.Interior.ColorIndex = 20
    Target.Interior.ColorIndex = xlColorIndexNone
End Sub

However, it's not working and I can't find an issue with it. i am attaching the link from where I got the idea.

enter image description here

It then looks like this in Sheet1:

enter image description here

  • Related