Hi everyone. I have an interesting problem.
I created a spreadsheet with groupings on certain rows.
I now want to delete the rows that belong to the grouping through code. To
identify the rows I want to delete I put a dummy comment on one of the cells
in the row and then run the following code to remove the rows:

For each wks in Application.ActiveWorkbook.Worksheets
wks.Activate
ActiveSheet.Cells.SpecialCells(xlCellTypeComments).EntireRow.Delete
Next

Now it works for some sheets but not others.
I get the error message:
"Cannot use that command on overlapping selections"

Strangely, it works if I perform the steps through the XL interface.
(Edit+Go To+Special...+Comments and then choose Edit+Delete+Entire Row)

Any ideas would be very appreciated.

Thank you.