delete row syntax
Sub deleteColoredRows()
Const LtGray = 15
Const DkGray = 16
Range("A1").EntireRow.Select
Do While ActiveCell.Value < ""
ActiveCell.Offset(1, 0).EntireRow.Select
Selection.Interior.ColorIndex = LtGray Or DkGray
EntireRow.Delete
Loop
End Sub
The loop works, the only thing wrong is the delete line.
If the row is either shade of gray I want it to delete.
what is the correct syntax for the delete line?
many thanks,
|