HectorManuel
New Member
- Joined
- Oct 6, 2016
- Messages
- 1
Help. I need to remove all FormatConditions in a Worksheet. There are 12 FormatConditions over several ranges and selecting each range and then deleting each one (Selection.FormtConditions.Delete) would be too cumbersome.
However, neither of the following alternatives seem to work:
ThisWorkbook.Sheets(1).Cells.FormatConditions.Delete
For i = 1 to ThisworkBook.Sheets(1).Cells.FormatConditions.Count
ThisWorkbook.Sheets(1).Cells.FormatConditions.Item(i).Delete 'I've also tried ThisWorkbook.Sheets(1).Cells.FormatConditions(i).Delete
Next
I keep getting a 'Application-defined or Object-defined error' message.
Any idea?
However, neither of the following alternatives seem to work:
ThisWorkbook.Sheets(1).Cells.FormatConditions.Delete
For i = 1 to ThisworkBook.Sheets(1).Cells.FormatConditions.Count
ThisWorkbook.Sheets(1).Cells.FormatConditions.Item(i).Delete 'I've also tried ThisWorkbook.Sheets(1).Cells.FormatConditions(i).Delete
Next
I keep getting a 'Application-defined or Object-defined error' message.
Any idea?