|
Conditional Formatting of Cells in Excel
Posted: 11 Jun 09 11:39 AM
|
I get this error when I execute this code: "Invalid Procedure call or Argument"
... .. With objExcel .Selection.FormatConditions.Delete
'it fails here .Selection.FormatConditions.Add xlExpression, xlEqual, "=$J2=0" ' .Selection.FormatConditions(1).Font.ColorIndex = 3 .Selection.FormatConditions.Add xlExpression, xlGreater, "=$F2>2" .Selection.FormatConditions(2).Font.ColorIndex = 10 .Selection.FormatConditions.Add xlExpression, xlGreater, "=$J2>2" End With
Can anyone tell me the right syntax to get this rolling? |
|
|