Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all
I've tried the code and it works more beautifull when you write it like this: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static OldRange As Range On Error Resume Next OldRange.EntireRow.Interior.ColorIndex = xlColorIndexNone Target.EntireRow.Interior.ColorIndex = 6 ' yellow - change as needed Set OldRange = Target End Sub First change the oldrange to None and than change the newrange to yellow. Otherwise there is a problem when the new range contains the old range (for example old range = B4 and new range = B2:B6). Then the old range is set to blank after the new range is yellow. Grtz, Jzz |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Highlighting Entire Row without the Mouse | Excel Discussion (Misc queries) | |||
Highlighting Entire Row using CF | Excel Worksheet Functions | |||
highlighting entire functions | Excel Discussion (Misc queries) | |||
Highlighting an entire row using conditional formatting. | Excel Worksheet Functions | |||
Highlighting entire row cursor on | Excel Discussion (Misc queries) |