View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Xman Xman is offline
external usenet poster
 
Posts: 13
Default Highlighting Rows with VB.

To anyone,

This is the current formula that I am using to highlight rows with:

-- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.FormatConditions.Delete
With Target.EntireRow
..FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlTop)
..LineStyle = xlContinuous
..Weight = xlThin
..ColorIndex = 5
End With
With .Borders(xlBottom)
..LineStyle = xlContinuous
..Weight = xlThin
..ColorIndex = 5
End With
End With
..FormatConditions(1).Interior.ColorIndex = 8
End With

End Sub

Works well...problem, is it removes any coditions that exsist in oter areas
of the SS.
And when I protect the page, the macro no longer works.

Is there any way to modify this command so that a column is skiped? For
instance;
I want the entire row with the exception of column "x". Can this be done?
Any help would be awesome!!!! Thanks,

JARoman