View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default highlight row of active cell

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static OldCell As Range
If Target.Column < 13 Then Exit Sub
If Application.CutCopyMode = 0 Then
If Not OldCell Is Nothing Then
OldCell.EntireRow.Interior.ColorIndex = xlColorIndexNone
OldCell.EntireRow.Borders.LineStyle = xlLineStyleNone
End If
Set OldCell = Target
OldCell.EntireRow.Interior.ColorIndex = 6
OldCell.EntireRow.Borders.LineStyle = xlContinuous
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
End Sub

Right-click on the sheet tab and "View Code".

Copy/paste the code into that module.

Alt + q to return to Excel.


Gord Dibben MS Excel MVP

On Tue, 18 Aug 2009 13:45:01 -0700, pswanie
wrote:





Hi all

i got a sheet where the user use only column m down. but i want the row of
the active cell to be hightlight.

in other words if a user select m12 i want the row m12 to be highlighted
automatic. The reason for this is that they need to easily see that they
are in the row with the right product in colum b down



Column b down will have the product name and in m they need to enter amount
of product to order. i cant hide the other columns as there are info in
that help them make the order....

regards


Phillip