Altering The Code to Highlight an Entire Row
Posted by Sean on January 22, 2002 8:00 AM
When I insert the code below (from this page called, "hilite - http://www.cpearson.com/excel/download.htm") into a workbook it highlights only the active cell. How can I alter the code so that it highlights the entire row?
Thank you in advance,
Sean
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Static OldCell As Range
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 6
Set OldCell = Target
End Sub