This “problem” is not new, and I don’t blame Excel entirely.
It’s been the same since I started this project using Excel 2003, 2007, and now 2010 version.
It only happens with the
Do Until
, more Loops within the Loop
Loop
Code
The Workbook process is perpetual, never ending until the time order events list runs out which is on a specific Worksheet.
The events may start from 10am and go through to 10pm.
So I'm "asking" Excel/VBA to web query each event, crunch some numbers, log results to a text file.
These form statistics.
During the process, after about an hour, or at best 3 hours of perpetual web query and loops, I will get an error message on the screen, saying Excel has crashed, send an error report, and re-start excel.
I can view the error log, but have no idea what it means.
If I press the Escape key to stop the run, and then use the F8 key to check my coding, sometimes the duration from pressing the F8 to the next code is delayed, it seems "bloated". Unless I re-start the workbook, all seems to be OK till the next time I start the macro or use the F8 key.
I have used many types of clearers within the Run of things, hoping this may clear up some memory or temp files such as;
Public Function ClearClipboard() OpenClipboard (0&) EmptyClipboard CloseClipboard End Function Sub CLEAR_CLIP_BOARD() Call ClearClipboard End Sub
The only other clue I see is when I use CCleaner, it shows Internet Explorer Temporary Files.
We already know a dynamic web query may use IE as part of it web query function, but none of my codes ask anything of IE browser. I do not require the browser to be open to make my web query.
So I think, is it because Excel/VBA has a limit as to what it can do and at a certain point one may need to consider programming ?
Or is there another clear method that has got to do with the computer's memory?
I really don't know what else to try.
Would posting the error report here be of help to see exactly where the problem originates from ?
Thanks