Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Slow macros cont.....

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Slow macros cont.....

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

-----Original Message-----
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

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Slow macros cont.....

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
-----Original Message-----
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

-----Original Message-----
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

.

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Slow macros cont.....

Hi there

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

Good luck though

Cheers
Fos

----- 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
-----Original Message----
Hi there
Have you tried using this

Application.ScreenUpdating = Fals
at the start of your macro
If you use this, YOU MUST add this to the end of the

macro
Application.ScreenUpdating = Tru
If you don't, you won't be able to use excel until you

restart it. Which is very annoying
Cheers

Fos
-----Original Message----

Hi Al
From my original example (see the bottom of the page) I

have replace
Rows("600:600").Selec
Selection.Delete Shift:=xlU
wit

Rows("600:600").Delete Shift:=xlU
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 furthe
Cheer
Original Exampl

Sub Delete_Row_600_551(
Sheets("Data").Selec
If Range("G600") < Range("Q1") The

Rows("600:600").Selec
Selection.Delete Shift:=xlU
End I
If Range("G600") Range("S1") The

Rows("600:600").Selec
Selection.Delete Shift:=xlU
End I
If Range("G599") < Range("Q1") The

Rows("599:599").Selec
Selection.Delete Shift:=xlU
End I
If Range("G599") Range("S1") The

Rows("599:599").Selec
Selection.Delete Shift:=xlU
End I
End Su



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Slow macros cont.....

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

Foss wrote:
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


-----Original Message-----
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

.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Slow macros cont.....

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
Hi there
Have you tried using this

Application.ScreenUpdating = Fals
at the start of your macro
If you use this, YOU MUST add this to the end of the macro

Application.ScreenUpdating = Tru
If you don't, you won't be able to use excel until you

restart it. Which is very annoying
Cheers

Fos
-----Original Message----

Hi Al
From my original example (see the bottom of the page) I
have replace

Rows("600:600").Selec
Selection.Delete Shift:=xlU
wit

Rows("600:600").Delete Shift:=xlU
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 furthe
Cheer
Original Exampl

Sub Delete_Row_600_551(
Sheets("Data").Selec
If Range("G600") < Range("Q1") The

Rows("600:600").Selec
Selection.Delete Shift:=xlU
End I
If Range("G600") Range("S1") The

Rows("600:600").Selec
Selection.Delete Shift:=xlU
End I
If Range("G599") < Range("Q1") The

Rows("599:599").Selec
Selection.Delete Shift:=xlU
End I
If Range("G599") Range("S1") The

Rows("599:599").Selec
Selection.Delete Shift:=xlU
End I
End Su


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - Slow & can't run macros Roger Excel Discussion (Misc queries) 9 March 26th 09 11:26 PM
Macros Running Sometimes Slow Sometimes Fast bigV Excel Discussion (Misc queries) 0 June 9th 08 03:13 PM
Excel 2002 - Slow macros Sanjeev S Excel Programming 12 June 10th 04 02:01 AM
Excel Macros Slow in XP VBA New Guy Excel Programming 1 December 29th 03 09:56 PM
Macros run slow in XP Jerry Park Excel Programming 0 July 22nd 03 09:54 PM


All times are GMT +1. The time now is 09:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"