Slow macros cont.....

S

Sanj

Hi All

From my original example (see the bottom of the page) I
have replaced
Rows("600:600").Select
Selection.Delete Shift:=xlUp

with
Rows("600:600").Delete Shift:=xlUp


This has helped a considerable amount, however, it zooms
through about 150 to 200 rows then slows again. Excel
2002 is a real pain at the moment.

can any one advise me further

Cheers





Original Example
Sub Delete_Row_600_551()

Sheets("Data").Select

If Range("G600") < Range("Q1") Then
Rows("600:600").Select
Selection.Delete Shift:=xlUp
End If

If Range("G600") > Range("S1") Then
Rows("600:600").Select
Selection.Delete Shift:=xlUp
End If


If Range("G599") < Range("Q1") Then
Rows("599:599").Select
Selection.Delete Shift:=xlUp
End If

If Range("G599") > Range("S1") Then
Rows("599:599").Select
Selection.Delete Shift:=xlUp
End If
End Sub
 
F

Foss

Hi there,

Have you tried using this:
Application.ScreenUpdating = False
at the start of your macro?

If you use this, YOU MUST add this to the end of the macro.
Application.ScreenUpdating = True

If you don't, you won't be able to use excel until you
restart it. Which is very annoying!

Cheers,
Foss
 
G

Guest

Hi

Yes I've included Screenupdate, Automatic Calculation,
Page Breaks etc, its actually a bug in excel when you
automate a task it slows down, however I'm looking for a
work-around.

cheers
 
F

Foss

Hi there

Sorry, you've reached the (rather limited) extent of my knowledge on this topic

Good luck though

Cheers
Fos

----- [email protected] wrote: ----

H

Yes I've included Screenupdate, Automatic Calculation,
Page Breaks etc, its actually a bug in excel when you
automate a task it slows down, however I'm looking for a
work-around

cheer
 
J

JWolf

You don't have to restart.
Type Application.ScreenUpdating = True
in the VBA immediate window and hit return.
 
F

Foss

I wish I already knew that..

Thanks very much

Cheers
Fos

----- JWolf wrote: ----

You don't have to restart
Type Application.ScreenUpdating = Tru
in the VBA immediate window and hit return

Foss wrote
 
Top