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: 4
Default macro timing issue

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
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
Possible Macro Timing Overrun generates Excel Exception [email protected] Excel Programming 1 February 8th 06 02:04 PM
Timing a macro ducttape Excel Discussion (Misc queries) 2 February 1st 06 10:23 PM
Macro timing might be the problem Oreg[_57_] Excel Programming 6 November 5th 05 02:52 AM
Timing Issue?? Geoff Excel Programming 4 June 29th 05 05:50 PM
timing a recorded macro wendy Excel Programming 3 January 3rd 04 02:26 PM


All times are GMT +1. The time now is 07:11 AM.

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"