View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Paul W Smith[_3_] Paul W Smith[_3_] is offline
external usenet poster
 
Posts: 11
Default Excel Slowing To A Crawl

I have a sub routine that runs though a series of workbooks, and through
each worksheet within each workbook. The routine performs it's purpose and
determines whether a row needs to be deleted.

If a condition is met then the flowing line of code performs the deletion:

[ForecastStart].Offset(r - 1, 0).EntireRow.Delete xlShiftUp

When the code runs the various workbooks are opening, the worksheets looped
through and saved and closed again.

PROBLEM

The code starts of running very quickly but slowly slows to a crawl. The
line of code above is the one which causes the problem. When I step through
the code it is this line that takes longer and longer to execute as the
length of time the program has been running lengthens.

The order I loop through the workbooks makes no difference. If I loop in a
different order the workbooks, with the apparently slow workbooks at the
front then they whizz through and the fast ones now crawl.

Both screenupdating has been set to false and calculation set to manual to
try to alleviate the problem.

Please please someone give me some things to try!