Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
We use a series of large workbooks to simulate business performance over
time. These workbooks and VBA code have perfomed well, i.e. 2-4 seconds per time iteration, using Excel 2003. Running the system using Excel 2007 on a new, high powered, dual core PC, using Vista takes 6-7 minutes per time iteration. On an XP machine it's taking 10-11 minutes. Looking where time is lost throughout our systems, we've come upon a simple piece of code that takes 15 seconds in 2007 vs. <1 second in 2003 (essentially instantly). This same Procedure placed in a new workbook running in 2007 also runs instantly, however not so in the full production system. Enabled Events is set to True, Screenupdating is False, Application Calculation is xlCalculationManual, ActiveWorksheet.EnableCalculation is False (these are all newly added to the code, not required in Excel 2003) The problem occurs in a For loop with 130 insertions of data into specific cells of an activeworksheet. This worksheet has no links to any other worksheet: For i = 1 to 13 For j = 1 to 10 ( 'tvalue' and 'target_column' (below) are simple functions of i and j ) ActiveSheet.Cells(1,target_column).Value = tvalue '<<<< DATA INSERTION Next j Next i The entire delay takes place in the data insertion statement; also, 'tvalue' can be set to "1" with no change in response. I'd appreciate any thoughts about what we're missing. Solving this typical type of code problem is necessary for us to continue with Excel 2007 at this time. Many thanks... -- Terry Priebe Decision Support Associates, Inc DeSA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Possible Macro Timing Overrun generates Excel Exception | Excel Programming | |||
Timing a macro | Excel Discussion (Misc queries) | |||
Macro timing might be the problem | Excel Programming | |||
Timing Issue?? | Excel Programming | |||
timing a recorded macro | Excel Programming |