Out of Memory Error, Error Handling!

G

Giri

Hi,

Note1: I currently have a macro that accesses thousands of
rows of data in a particular worksheet of the same
workbook & generates a summary. Hence, i want to check if
there is sufficient memory space (that the m/c would not
hang) and then continue to the next line of code. I am
checking for "err.number <> 0" at specific points to
determine if it is ok to continue and also
using "application.cutcopymode = false" where ever
applicable. Have i missed out on anything? Is there a
specific error number for "out of memory" or something ?
Further, i am not sure whether the control would still be
in execution when an "out of memory" or some other runtime
error occurs.
Note2: Most m/c here are with 128 MB RAM. Virtual Memory &
File System are both 32-bit with no customization. System
Resources and CPU utilization is what varies (and which i
think i shud check so that the m/c does not hang due to
the macro!)

With the above note in mind, i would be grateful for any
help on error handling. Would also appreciate if you could
specifically help on "How to check from the VBA code if my
system has enough memory to continue execution" as this is
the main concern i have right now.

Thank You in advance for your help and patience.

Regards,
Giri
 
Top