J
JohnUK
Hi, I had some fantastic help from Gary’s Student some time back, whereas he
put together a piece of code that deletes rows from the bottom of the page
upwards:
Sub RowKiller()
Dim r1 As Range, r2 As Range
Dim n As Long
n = Cells(Rows.Count, "K").End(xlUp).Row
m = n + 10
Set r1 = Range("K" & n)
Set r2 = Range("K" & m & ":K" & Rows.Count)
If r1.Value <> "" Then
r2.EntireRow.Delete
End If
End Sub
Now, this worked well using Office 2003 because the amount of lines was only
65,000 whereas 2007 is in excess of 100,000 and has now slowed down the
process admittedly by only 50 seconds, but I would have expected a speed
increase not decrease.
Is there something else I can try, maybe a different type of code for 2007
use?
As usual, help greatly appreciated
John
put together a piece of code that deletes rows from the bottom of the page
upwards:
Sub RowKiller()
Dim r1 As Range, r2 As Range
Dim n As Long
n = Cells(Rows.Count, "K").End(xlUp).Row
m = n + 10
Set r1 = Range("K" & n)
Set r2 = Range("K" & m & ":K" & Rows.Count)
If r1.Value <> "" Then
r2.EntireRow.Delete
End If
End Sub
Now, this worked well using Office 2003 because the amount of lines was only
65,000 whereas 2007 is in excess of 100,000 and has now slowed down the
process admittedly by only 50 seconds, but I would have expected a speed
increase not decrease.
Is there something else I can try, maybe a different type of code for 2007
use?
As usual, help greatly appreciated
John