+ Reply to Thread
Results 1 to 3 of 3

Constantly getting "Out of memory" messages when VBA window is open

  1. #1
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Constantly getting "Out of memory" messages when VBA window is open

    Cross-posted at
    MrExcel
    Microsoft Community
    Reddit

    For quite some time I have been getting pop-up dialogs that say "Out of memory" when I am using Excel. The system memory utilization is typically around 50% when this happens. I have 32G of physical memory.

    These messages typically occur after I have been using Excel for a while. It doesn't seem to matter how many files I have open; it happens if only one file is open. However, once it starts, it only happens when the VBA development window is open, and happens immediately after any action on worksheet, even selecting another cell. It does not happen when VBA code is actually running. Closing the VBA window causes the messages to stop, until the next time I open it.

    I have been working around it but it's time to solve it. I have found no clues in searches since most of them recommend reducing memory usage or adding more physical memory. But there is 16G of headroom, so this should not be an issue.

    Currently on version 2402, Build 17328. 20184, Current Channel.

    As an example, it's happening right now. Excel has four files open, and Task Manager shows Excel is using only 137MB of memory.
    Last edited by 6StringJazzer; 03-24-2024 at 12:26 PM.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Constantly getting "Out of memory" messages when VBA window is open

    I've never seen this problem so my suggestions below are based purely on some searching. They all involve using tools to check how much memory Excel thinks it has, as opposed to how much your system actually has. Apologies if you've already been down these roads.

    1. This page suggests that there might be a 4GB limit for VBA, which might (I'm stretching here) apply to the VBE too. It suggests using the MS Technet Process Explorer to measure Virtual Memory use.

    2. This MS page about Excel performance and limits has a link to a Memory Checking Tool which also might help narrow down possible causes.

    3. Finally, it's possible to check how much memory Excel thinks it's got using the _Application.MemoryFree property, though of course this only works when Excel/VBE hasn't already stopped working.

    Disclaimer: I haven't tried any of the tools linked above, as I've never needed to.
    Good luck.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Constantly getting "Out of memory" messages when VBA window is open

    Thanks for the references. I'll dig in. #3 is a .NET call, not sure how you get to it. I don't know if there is a VBA API or if I have to develop a .NET application in C#.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to prevent "update values" window open when code executes to enter formula in table?
    By carlito2002wgn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2019, 03:44 PM
  2. [SOLVED] Open Workbook in "Full Screen" mode but with sized "Window" View
    By HGL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2016, 05:54 AM
  3. [SOLVED] Spreadsheets "disappear" within open Excel Window
    By Gypsy200 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-12-2015, 02:40 PM
  4. [SOLVED] [NOT REALLY SOLVED]Open an explorer window in the current path, without "folders" showing?
    By Rhudi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2014, 01:17 PM
  5. VBA - IE - click on "Open" in an internet explorer "file download" window
    By victoire in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-22-2013, 07:08 AM
  6. [SOLVED] How to change the font of Display window of "Open File"
    By Windows Font in forum Excel General
    Replies: 0
    Last Post: 01-05-2006, 11:15 PM
  7. Not all open workbooks listed in "Window" menu.
    By markdon in forum Excel General
    Replies: 1
    Last Post: 01-20-2005, 05:24 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1