View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Trevor Shuttleworth Trevor Shuttleworth is offline
external usenet poster
 
Posts: 1,089
Default Selecting rows with variable

Jim

Sub TestDeleteRows()
Dim RowCounter As Long
RowCounter = 10
Rows("4:" & RowCounter).EntireRow.Delete
End Sub

works for me

Regards

Trevor


"Jim" wrote in message
...
Im trying to select, then delete a whole lod of rows in
one go. Im trying to use the following commands:
Rows("4:" & count_y ).Select
Selection.Delete Shift:=xlUp

It doesn't like this at all. How can I get it to do what
I want?