LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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,
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete syntax problem anny Excel Worksheet Functions 3 January 27th 06 03:59 AM
Macro to delete sheets and saves remaining file does not properly delete module pherrero Excel Programming 0 June 21st 05 05:11 PM
Delete Row syntax conundrum username Excel Discussion (Misc queries) 5 May 24th 05 05:36 PM
Delete Row syntax conundrum JFH New Users to Excel 2 May 24th 05 11:31 AM
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below Annette[_4_] Excel Programming 2 September 21st 04 02:40 PM


All times are GMT +1. The time now is 09:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"