View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Janis Janis is offline
external usenet poster
 
Posts: 360
Default 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,