View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Iterative consolidation macro can't complete - memory overload?

On 28/11/2014 17:41, Stuart wrote:
Thanks :) It's XL2010.

I seem to have got it working, touch wood, through a combination
of:

1) Storing the list of filenames in an array, i.e. doing the DIR
loop first not during the main code.


It is probably a race condition in the filesystem somewhere. Likely
to be related to the one that caused another way of iterating through
a directory of files to be discontinued in XL2007.

2) Putting in application.waits of 1 second where files are being
opened, closed or saved, to give Excel and the network drive time
to sync

It seems to be working so far.


My guess with these is that they are an unfortunate effect of
multiCPU systems running code that isn't entirely proofed against
reaching a point where the consumer thread is reading uninitialised
or partially initialised structures. It is especially bad in the
graphing/charts.


This is also accentuated if there's an explorer window open at the
target folder! I haven't experienced this since replacing explorer with
PowerDesk Pro!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion