Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.word.vba.general,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How could I have saved memory?


"Str" is a VBA function. Don't use it as a variable.
Set all of your Excel object variables to nothing.



"Ed from AZ"
wrote in message
I threw together a macro in Word 2007 yesterday, but it kept
interrupting. There was no error, but I'd get the annoying message
box that says "Code execution has been interrupted." and the CONTINUE,
END, and DEBUG buttons. I've learned this is usually an indication
that I'm stretching the capacity of my memory - all I have to do is
hit CONTINUE and it runs along just fine - until it interuupts again!!

I had tables in a Word doc with reprot numbers in one column, and
several more blank columns. The data to fill in those blanks was
mostly in an Excel spreadsheet. One blank, though, could only be
filled in by finding the report document and grabbing one line of
text.

So the macro was designed to set an object to the table I had selected
and iterate down the report numbers, open the spreadsheet and find the
needed values for that report, then open the report, grab the one line
of text, and close the report. Lather, rinse, repeat until the end of
the table.

Can someone see where I could have saved memory overhead and made this
run a bit smoother?

Ed
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I recover an Excel document saved not saved as Darryl Excel Discussion (Misc queries) 6 January 5th 10 03:39 AM
XL 2007 - Out of Memory - memory leak/bug? PCLIVE Excel Discussion (Misc queries) 0 March 23rd 09 03:31 PM
(reposting) Memory problem: Out of Memory and cannot save WHA Excel Programming 0 November 30th 07 05:09 PM
Memory problem: Out of Memory and cannot save WHA Excel Programming 0 November 30th 07 03:52 AM
The instruction at "0x65255ac9" referenced memory at "0x00000008". The memory could not be read. Clikc OK to terminate etc Angus Comber[_2_] Excel Programming 1 November 7th 03 01:18 PM


All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"