PC Review


Reply
Thread Tools Rate Thread

clearing memory using VBA

 
 
=?Utf-8?B?TmF0aGFuRw==?=
Guest
Posts: n/a
 
      30th Oct 2007
Hi,

I have a problem with memory increasing in an instance of Excel. When excel
is first opened the memory is around 40k. There is a lot of VBA code running
macros to copy cells, connect to a database, retrieve etc etc

Each time a retrieve is done, which involves a large combination of actions,
the memory on the instance of excel increases 5 or 6 k. After 5 or 6 times
excel becomes slow, retrieves take longer and the only way to get rid of the
problem is closing excel completely. I have tried using

application.cutcopymode=false after copying data. There are also some global
variables and I have tried setting these to nothing but it has done very
little good. Is there a general piece of VBA code to clear the memory that
excel uses?

Thanks!

Nathan
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      30th Oct 2007
Post your code... There are a couple of things you can do to release
memory/speed up execution. Depending how you are querying you might just need
to set your objects to nothing when you are done with them...
--
HTH...

Jim Thomlinson


"NathanG" wrote:

> Hi,
>
> I have a problem with memory increasing in an instance of Excel. When excel
> is first opened the memory is around 40k. There is a lot of VBA code running
> macros to copy cells, connect to a database, retrieve etc etc
>
> Each time a retrieve is done, which involves a large combination of actions,
> the memory on the instance of excel increases 5 or 6 k. After 5 or 6 times
> excel becomes slow, retrieves take longer and the only way to get rid of the
> problem is closing excel completely. I have tried using
>
> application.cutcopymode=false after copying data. There are also some global
> variables and I have tried setting these to nothing but it has done very
> little good. Is there a general piece of VBA code to clear the memory that
> excel uses?
>
> Thanks!
>
> Nathan

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clearing memory (ram) for xp =?Utf-8?B?R2VyYXJk?= Windows XP Performance 7 6th Sep 2007 03:00 AM
Clearing Memory Pete-Peters@sbcglobal.net Microsoft Excel Programming 5 17th Mar 2006 01:21 AM
Clearing Memory Pete-Peters@sbcglobal.net Microsoft Excel Programming 2 16th Mar 2006 02:20 PM
Clearing Memory Phil Windows XP General 4 30th Dec 2004 06:01 PM
Clearing Memory =?Utf-8?B?Sm9ubnk=?= Microsoft Excel Programming 1 6th Dec 2004 05:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:07 PM.