View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default highlight of a range

right click on the sheet tab and select view code

paste in code like this:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object,
ByVal Target As Excel.Range)
Static OldRange As Range
On Error Resume Next
Target.Entirerow.Interior.ColorIndex = 6 ' yellow - change as needed
OldRange.EntireRow.Interior.ColorIndex = xlColorIndexNone
Set OldRange = Target

End Sub

Adapted from code by Chip Pearson.

http://www.cpearson.com/excel/excelM...ightActiveCell

--
Regards,
Tom Ogilvy

"shawn" wrote in message
...
I have a spreadsheet that has several hundred rows and 25 columns of info.

I
would like to be able to highlight the entire row of information that the
cursur is in and the highlighted row moves as the cursur moves. I am not
sure how to do this please help

thanks