delete row and 3 rows below by range selected

  • Thread starter Thread starter Corey
  • Start date Start date
C

Corey

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....
 
Try this

Sub test()
If Not Application.Intersect(Range("A28,A32,A36,A40,A44,A48,A52,A56,A60"), ActiveCell) Is Nothing Then
ActiveCell.Resize(4).EntireRow.Delete
End If
End Sub
 
will try it tomorrow.
Thanks for the reply Ron.
I have 100% confidence in you code.

Corey....
 
Back
Top