Hi
In the attached workbook I have a table to a specific row but after that table I have another section with blue background. I am using the bellow code to highlight the activerow to specific number of columns.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static Rng As Range
On Error Resume Next
If Target.Column <= 9 And Target.Row > 1 Then ' This can be modified if the target columns are not in sequence
Rng.Interior.ColorIndex = xlColorIndexNone
Set Rng = Range("A" & Target.Row & ":I" & Target.Row)
Rng.Interior.ColorIndex = 6
End If
End Sub
PROBLEM: The code is working fine as far the table is concerned. but when my selection goes down in the blue section it overright the color
What I want is to set the color back to the range's previous interior color
Help would be greatly appreciated.
Best Regards
Imran Bhatti
Bookmarks