• VBA Out of memory (2000 (SR-1))

    Author
    Topic
    #373605

    Recently whenever I test run my program, and try to invoke VBA editor, my system (Windows Me with 386 MB RAM) isssued me an “Out of Memory” warning, and I couldn’t run the VBA editor. I still have more than 100 MB free memory then! My program consists of only a front-end (7600 KB) and a test back-end (956 KB). It runs well on another Windows98 machine with 256 MB RAM. Why gives?

    Viewing 1 reply thread
    Author
    Replies
    • #601088

      This sounds suspiciously like either something is hosed with the VB6.dll file, or you have a set of code running somewhere that hasn’t gotten turned off. I would look at the VB6 issue first. Have you installed any software recently? There are several products that apparently put an incompativle version of the VB files on your hard drive and replace things without asking or telling you.

      • #601634

        I disabled or closed the five resident launchers in my system – GetRight, ZoneAlarm, PGP, MemTurbo and Norton Antiirus Auto-Protect – and re-started my Access 2K. After loading my database, I managed to use VBA editor for a while. After I added more codes and objects to my database, again the warning “Out of Memory” appeared when I tried to access the VBA editor. I didn’t install any new programs for the past three months except Windows and Norton Virus pattern updates, which were periodically run when I was connected to the Internet.

        I remembered reading about the maximum size of data Access can process, but I have yet to come across any mention of the limitation on codes and objects in an Access database. Is there a maximum size to the codes and objects which Access can manage before the dreadful “Out of Memory” alarm?

        • #601686

          Have you left any recordsets open, and then re-opened them? It also pays to set them to ‘Nothing’ after closing.

          Failing to do the above will gobble up your memory.

        • #601699

          Check out MS knowledge base article Q223235 – it sounds very similar to your problem. The solution appears to be to import all the objects into a new database and then close a code window after editing. We work with some projects with hundreds of modules, so I doubt you’ve hit any Access size constraints – to see what those are for 2000, search Help for “specifications”

    • #601842

      Hi lesoch

      I have your same configuration and get the same message.

      It usually occurs in the middle of the day after tasking between a2k, word, aol, etc.

      I close all apps and shutdown and restart the system to continue without message.

      Wendells solution will works as well.

      Charlotte talks about leaky code that can cause problems, Do a search on leaky

      Others say when you task between Office modules billy bob does a terrible job reclaiming memory.

      Hope others can respond, out of memory gets scary.

      HTH

      re: 104429 from Support4John

      • #602035

        Surely “Out of Memory” alarm is scary. I checked the KB article suggested by Wendell (thanks) and it appeared that the problem is limited to Access 2K and VBA editor. It never occurred to me that I need to close the code windows each time I open one to save system resources. I was under the impression that only a code window was opened when I used the VBA editor. I closed my code windows and mentally calculated that I closed a total 63 code windows. After closing all the code windows, the database ran a little faster but there was no guarantee that the scary alarm message won’t reappear. In fact it did!

        I checked my codes and all my recordsets, and workspaces were closed and set to nothing before exiting. There is no possibility of memory leakage, I think. But closing ZoneAlarm, Norton Auto-Protect and MemTurbo to reclaim memory rersources also helped to make “Out of Memory” disappear. I wonder if others have similar experience.

        • #602086

          You had 63 code windows open??!!

          Back a while ago WMVP Kevin posted some simple but very useful code in the VB/VBA forum that closes all open code windows in the VB Editor. Link:

          VBE Code Pane vs. Object Pane

          You may want to copy this code to standard module and run as often as necessary. In VBE you can run any public sub from the Tools>Macros menu (macro here as in Word or Excel, not Access, sense).

        • #602103

          If you had 63 code windows open, I’m not at all surprised you got an out of memory message. Did you also have 63 forms or reports open in the UI? It is possible to generate a bogus out of memory message, but in this case, I’d say it was entirely truthful. Say rather that the problem is new to Access 2000 because of the change to the VBE.

    Viewing 1 reply thread
    Reply To: VBA Out of memory (2000 (SR-1))

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: