View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sarah Sarah is offline
external usenet poster
 
Posts: 231
Default conditional formatting 1004 errors

I'm a rookie. I am getting Run-time error '1004': Unable to set the Bold
property of the Font class with the following code:

Range("I10:I1000").Select

Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=(AND(ABS($J10)$G$5,ABS($I10)$G$4))"

Selection.FormatConditions(Selection.FormatConditi ons.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.Color = -16776961
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = True

Thank you