
Originally Posted by
luna
i found this code, it doesnt change the original highlighted color
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Rows(Target.Row).Select ' highlite entire row
Target.Activate ' select the cell
End Sub
And following can be used to highlight row and column both
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
Range(Target.EntireRow.Address & "," & Target.EntireColumn.Address).Select 'OR Union(Target.EntireRow, Target.EntireColumn).Select
Target.Activate
Application.EnableEvents = True
End Sub
Bookmarks