Row-Entire row changes color (and stays) selecting first entry
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Data As Range
'remove previous colour from region
Set Data = Range("a1:ad60")
Data.Interior.ColorIndex = xlNone
On Error GoTo ErrorHandler
Set Target = Intersect(Target, Data) 'errors if target outside
Intersect(Target.EntireRow, Data).Interior.ColorIndex = 35 'errors if no
intersection found
Exit Sub
ErrorHandler: 'if either line errored do nothing
On Error Resume Next
End Sub
"Harry's GMail World" wrote:
I have a sheet with 63 rows and 30 columns. I would like the row to
change color and stay as I slide across columns. Freeze panes works
almost but to change color would be better.
|