macros run increasingly slowly

A

Andrew

I am running excel 2002 on Windows XP, i have a fast machine with 1gb memory.
I use a simple macro that removes and reinserts sub-totals, sorts and adds
some formatting.

The first time i run the macro it works quickly. On susbequent occaisions
it slows down almost to the point of stopping (10 minutes or more).

I have not written any fancy code, just recorded the actions. (On weaker
machines with less memory etc. this problem does not materialse).

Can anyone suggest anything?
 
T

Tom Ogilvy

If you have printed or done print preview, you could still be showing the
dotted lines indicating the page boundaries. This does what you say - slows
things down significantly. At the top of the code do


Activesheet.displaypagebreaks = false
 
J

Jim Thomlinson

Here is a great resource on optimizing speed and memory allocation. If things
start to run slowly often it is a matter of running out of memory. (Excel can
not use all of your memeory. The amount depends on your version.). It may
help

http://www.decisionmodels.com/index.htm
 

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

Top