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: 276
Default delete row and 3 rows below by range selected

The below code does not work, but how can i get it carry out what it says?

Private Sub CommandButton13_Click()
With activeworksheet
Dim rng As Range
Set rng = Range("A28,A32,A36,A40,A44,A48,A52,A56,A60")
If ActiveCell = rng Then ' <=== If selected cell is in range above ??
..Row -.Row + 4 '<==== Then delete the ROW that the selected cell is in and
the 3 ROWS below it ALSO??
..Delete

End If
End With
End Sub

Corey....


 
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 selected range RW Excel Programming 2 December 12th 05 12:55 PM
delete every nth row in selected range cwinters Excel Discussion (Misc queries) 1 July 6th 05 08:17 PM
Delete non-selected rows SparePersn Excel Programming 2 December 21st 04 02:57 PM
Delete Selected Rows Ken[_18_] Excel Programming 2 February 5th 04 10:33 PM
Need a macro to delete selected rows RKettle Excel Programming 5 January 13th 04 05:29 PM


All times are GMT +1. The time now is 07:45 AM.

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

About Us

"It's about Microsoft Excel"