Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using Code Editor Slows execution speed | Excel Programming | |||
Beginners question: how to stop / abort execution of vba program | Excel Programming | |||
Program execution prob | Excel Programming | |||
PrintPreview slows Code Execution | Excel Programming | |||
MsgBox execution sends program into design mode | Excel Programming |