the_net_2.0
Banned
- Local time
- Today, 12:50
- Joined
- Sep 6, 2010
- Messages
- 812
yes...![]()
could you give me a clue as to how it should be done?
p.s. and thanks for all the help so far.
yeah no problem. You know I don't really know, and i don't really have the time right now to think about it. But I really don't understand why the code I posted for you does not fit the job. What's wrong with it? the example to complex to understand?
how many recs are there in the table? you said 30 distinct dates. I understand that. but how many total recs? my guess is, with the speed that vba can execute code, if you had 100,000 records total and 30 loops to perform it would take about 1-3 min. I think that's overstating, but I really have no idea, as I'm not an expert with code execution.
the other thing about extremely long execution times is that vba can seriously corrupt data output if the code runs long enough. that's my experience anyway. what I've done in the past, if I am looping a lot and a loops have to run a long time, is put a break point at the end of every loop to let vba catch up, gather thoughts, restructure memory, etc... whatever you want to call it.
everytime I have done that, the long executions have come out fine. It's kind of a pain to sit there and press the OK button in a msgbox after every loop finishes, but it's better than getting output that's completely incorrect.