Slow macros cont.....

  • Thread starter Thread starter Sanj
  • Start date Start date
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
 
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
 
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
 
Hi there

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

Good luck though

Cheers
Fos

----- (e-mail address removed) 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
 
You don't have to restart.
Type Application.ScreenUpdating = True
in the VBA immediate window and hit return.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top