I think we lost the OP on this one Gord. I interpreted his post like Bernard
since he said he wanted to clear all rules from all worksheets, it seemed he
meant gridlines. I didn't even think about CF criteria as rules.
"Gord Dibben" wrote:
Are you running Excel 2007 and do you mean Conditional Formatting "Rules"?
If so, I probably can't help..........I don't use 2007.
A couple other responders interpreted "rules" to mean gridlines.
Just wanted to clarify what you're looking for.
In 2003 you could use a macro like this.
Assumes all sheets have some CF so no error checking.
Sub clear_CF()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Cells.SpecialCells(xlCellTypeAllFormatCondition s) _
.FormatConditions.Delete
Next ws
End Sub
Gord Dibben MS Excel MVP
On Wed, 5 Nov 2008 14:36:01 -0800, John A <John
wrote:
I'm looking for a macro to clear rules from all my worksheets of a workbook.