View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default VBA slows with time

Hi Again,

I did change the code so that the variables are put to nothing at each pass.
I Escaped to pause the execution about 2/3 of the way through the 4th pass. I
estimate the 4th pass will take about 38 minutes, so it appears that this did
not work.

Task Manager indicates that Excel.exe is consuming 99% of memory. If I go
into the worksheet being acted upon, enter something simple in a cell or
simply moving around can take 1 to 1 1/2 seconds, simply put it has slowed
response time extremely.

I do think we may be on the right track though, but Excel is using memory
for other purposes, beyond variable memory storage. The code has been copied
out of the original file and put in clean to a new module, so I am certain
none of the other Class Modules have code in them. After Excel has had some
time to "calm down" it is no longer comsuming 99% of memory, but in the
worksheet, response time is very, very slow, as already noted.

Maybe some one has some more ideas? BackgroundQuery = False is already the
case.

"Alan Hutchins" wrote:

david,

It looks as though the process is not releasing memory as it goes through
the 4 legs as you describe.

I would suggest that you go back to the original author and discuss with
them, as they may suggest that you reset any variables to nothing and so on
to see if that makes a difference.

--
Alan Hutchins


"David" wrote:

Hi r,

Someone helped me me with the code and asked me not to share it. Sorry.
There is really not anything that complicated. It it bring in a csv table
from Yahoo and like I said the names are deleted.

The person that helped me I trust. I did look through the various class
modules to see if something might not be in them and found nothing.

I might copy the code out and put it in a new file to test it and see if
that makes a difference, but I expect not. Looking for others that might have
had similar problems and found some sort of solution.

What was most suprising was the continued Excel.exe memory usage, after the
macro has finished.

Still looking for insight.

Thanks,
David

"r" wrote:

you can show the code?
regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"David" wrote:

Hi Group,

Hope all are having a good day. I have some code that does web queries. It
is sort of in 4 legs. It does a lookup of Fund ticker symbols and bring back
closes for a specific symbol and a specific single day. The list of symbols
is a little over 800.

It does this 4 times for 4 different dates, what I am calling legs. So 4
legs. Each leg about doubles the time of the previous leg. 2 minutes, 4
minutes, 5 minutes and 10 minutes. The query is deleted after each look up
and all names are also deleted.

When the macro is finished. Task manger indicated that Excel.exe is still
using 90% of memory. I am very perplexed at this situation.

Does anyone have any insights on this situation?
One of the other problems I am having is that when I leave this message and
check the box below "Notify me of replies", I do not recieve e-mail
notifications.

Thanks for your help,
David