Private
Sub
Workbook_SheetSelectionChange(
ByVal
Sh
As
Object
, _
ByVal
Target
As
Range)
Dim
wsh
As
Worksheet
Dim
rng
As
Range
Set
wsh = Target.Worksheet
Set
rng = wsh.Range(wsh.Range(
"A1"
), wsh.Range(
"K3"
))
If
Intersect(Target, rng)
Is
Nothing
Then
If
Not
prevCell
Is
Nothing
Then
prevCell.EntireRow.Interior.ColorIndex = xlColorIndexNone
prevCell.EntireColumn.Interior.ColorIndex = xlColorIndexNone
End
If
Target.EntireRow.Interior.Color = RGB(255, 200, 200)
Target.EntireColumn.Interior.Color = RGB(255, 200, 200)
Set
prevCell = Target
End
If
End
Sub