View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Colin Hayes Colin Hayes is offline
external usenet poster
 
Posts: 465
Default delete rows between tow inputs numbers

In article
,
James Ravenswood writes
How about:

Sub rowKiller()
Dim n1 As String, n2 As String, s As String n1 = Application.InputBox(prompt:="en
ter first row",
Type:=2) n2 = Application.InputBox(prompt:="enter last row", Type:=2)
If n2 = "last row" Then
n2 = CStr(Rows.Count)
End If
s = n1 & ":" & n2
Rows(s).Delete
End Sub



HI James

OK thanks for that. It works perfectly first time.

^_^


Best Wishes ,