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: 5,600
Default Manual Calc in a loop issue

Per and Jim,

Thanks both for testing.
I was kind of expecting one or two might replicate, perhaps it's only in my
systems. Actually no, the issue arose from someone else experiencing similar
in this ng several months ago.

Jim,
My rule #3: don't run long loops without a DoEvents inside the loop.


Really? Well an occasional DoEvents indeed prevents the problem (if done in
time), as does intermittent re-calc. As it happens MS have also suggested
DoEvents. What I find curious is if anything I would expect the scenario
more likely to occur with automatic calculation rather than manual.

However I don't think DoEvents is a good idea at all, at least not without
knowing the potential consequenses. Say the routine was called from a
button, user presses the button another 5 times whilst running between
subseqent Doevents (people do that kind of thing), when done the macro will
re-run another 5 times. Or maybe something else will get triggered. Also,
if DoEvents is called in every loop, as some do, it'll significantly slow
things.

Rules #1 & 2, dare I ask ? :-)

Regards,
Peter T


 
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
VBA code to update sheets in manual calc workbook Dewey Excel Programming 0 July 16th 08 09:38 PM
Calc = Manual & Do Not Calc b/4 SAVE Ken Excel Discussion (Misc queries) 0 October 3rd 07 02:28 PM
Data entry too slow even with calc set to manual [email protected] Excel Discussion (Misc queries) 1 September 22nd 06 11:00 AM
Open CSV causes calculation in manual calc mode [email protected] Excel Discussion (Misc queries) 0 July 25th 06 09:22 PM
Automatic Manual Calc When Opening!! twogoodtwo[_4_] Excel Programming 3 November 10th 05 06:12 PM


All times are GMT +1. The time now is 12:15 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"