Results 1 to 4 of 4
  1. #1
    goetz
    Guest

    run out of memory in vb program (excel vb 97 SR2)

    Hi out there,
    I wrote a program that opens files, connects, changes and closes them. About 5000 files are opened (sequentially) and about 700 are stored. I observe that, during the runtime of the program, the systems resources (i.e., the memory of the computer) are decreasing continuously, and after a time an error message (not enough memory) is displayed. The hypothesis is that the memory is not set free after closing a file.
    Interestingly, the system resources increase again when I interrupt the program with the escape key. After that, the run can be continued.
    Can you help me? Is there a possibility to set memory areas free?
    Thanks a lot.
    Goetz

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: run out of memory in vb program (excel vb 97 SR2)

    What kind of files are you opening and closing?
    Charlotte

  4. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: run out of memory in vb program (excel vb 97 SR2)

    And let's see the code that does all this opening and closing. We may be of service after that...
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  5. #4
    goetz
    Guest

    Re: run out of memory in vb program (excel vb 97 SR2)

    Here is the program. As you can see, it reads just ASCII-files and uses the Workbooks.OpenText and activewindow.close procedures. The output files are ASCII as well and are stored in the csv format.
    Goetz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •