Useful Comment Concerning Memory Read/Write Errors
I agree. I know that all variables are (or should be) wiped out when a
module's code stops running, but I still make it my practice to set every
object variable to Nothing before I end my routines - and preferably as soon
as I am done using it. It may be redundant, it may be unnecessary, but it
assures me that I am in control of the memory situation - and IMHO, helps to
avoid problems that can come about by sloppy code (mine or others') or errors
(mine or others').
K Dales
"Donna" wrote:
Or what I hope people will find useful.
I have been having read and write memory errors while generating or
trying to change captions for commandbuttons I have generated in a
macro that loops so I can generate multiple commandbuttons
From reading other threads in this forum I have set every variable
used to either Nothing or Empty when finished with it and it did work.
My macro's run like a dream.
I have posted this as once you seem to get in the trap of getting a
memory error, it is very difficult to pin point the problem.
I will certainly ensure I empty all variable when finished with them
in the future.
Has anybody else got any useful must do's to prevent memory errors ?
|