LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Program execution slows down in as iterations increase

Hi -

I posted this question over in the VSTO forum but thought I'd try it here too.

I am developing a Excel 2007 application using C# (VSTO).

So the program flow is populate the worksheet with numbers and text (these
come from a cube and SQL data tables in a SQL database), copy paste it to a
second worksheet in another workbook, go back to the original worksheet and
populate it with new numbers from the next contract, copy paste it to the
second worksheet but below the prior copy/paste section ... this is repeated
many times to as many as 1000 times or more.

The problem I'm having is that as the iteration increases into the 300 or
400's the program slows down to a virtual crawl, sometimes just stopping.

As a shot in the dark it seems like I'm using some resource without
releasing it which causes memory drain.

It works fine through 50 or 100 iterations but as I said it begins to slow
after that. In fact, I'm playing with a workaround which does 50 or so
copy/pastes at a time, then bulk copy the 50 onto a third worksheet. This
seems to work okay ... so that I avoid the "crawl", but it would be great to
understand why the slow down in the first place.

Any suggestions would be appreciated.

Mark

 
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
Using Code Editor Slows execution speed Lon Sarnoff Excel Programming 1 February 24th 07 03:59 AM
Beginners question: how to stop / abort execution of vba program Rainer[_3_] Excel Programming 15 June 6th 06 08:59 AM
Program execution prob PLPE[_11_] Excel Programming 2 June 30th 05 01:09 PM
PrintPreview slows Code Execution Don Lloyd Excel Programming 3 April 6th 05 12:37 PM
MsgBox execution sends program into design mode Jenn Excel Programming 2 April 14th 04 10:21 PM


All times are GMT +1. The time now is 02:30 PM.

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

About Us

"It's about Microsoft Excel"