View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Highlight Cells in Active Row

Right click sheet tabview codepaste this. Now when you select a row
it will highlight col a & b of that row

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.FormatConditions.Delete
'With Target.EntireRow
With Cells(Target.Row, 1).Resize(, 2)
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 6 '35
End With
End Sub



On Jun 8, 1:00*pm, Pete wrote:
Hi,

Can anyone tell me how to highlight cells in column A & B of the
active row, I wish this to be a Workbook command if possible.

Thanks

Peter