View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Slow in program after running few times

Hi Dave,

ActiveWindow.DisplayGridlines = False


Did you intend:

ActiveSheet.DisplayPageBreaks = False.

?

---
Regards,
Norman



"Dave Peterson" wrote in message
...
If you're code deletes/inserts rows or columns, maybe adding something
like this
to the top will speed it up.

ActiveWindow.DisplayGridlines = False

If you leave those little dashed lines in the display, then excel figures
it has
to determine where they go each time you insert/delete rows. And if
you're
doing a lot of that kind of stuff, it can slow things down a lot.



tang lk wrote:

I write a simple VBA program to extract certain info from different files
(same format).

After running for few times, the program become very slow and need to
close
and reopen the excel file again in order to make the VBA program faster.

Any idea why it happen ?

regards


--

Dave Peterson