+ Reply to Thread
Results 1 to 2 of 2

Out of Memory on Closing without saving

  1. #1
    Registered User
    Join Date
    09-13-2010
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2013
    Posts
    9

    Out of Memory on Closing without saving

    I have a workbook that has several VBA userforms that are used for data entry that interact with workbook. The Worksheet_open sub shows a modeless form (master menu) with a number of command buttons that actually load other forms and do all calculations when selected. One of these command buttons is a close button for the menu. It unloads the form. Nothing is queued up at that time. If I save the workbook all is well and then I can close Excel without a problem. If however, I selected Do Not Save when prompted, I get an out of memory error. This pops up three times before Excel closes. Sometimes it saves a recovery file and sometimes it saves and restarts. When I open and select the file to recover and say repair, it says there is nothing to repair. This behavior occurs even if I do none of the commands, that is when the menu appears, I tell it to close and then immediately close the workbook and Excel without saving. I believe I have ample virtual memory.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Out of Memory on Closing without saving

    I suggest you build in an extra function to close all userforms and clear memory before the workbook is closed either with out without saving.
    Especially Userforms can cause issues and I do not know what is triggered when the userform(s) you have are closed and maybe even worksheet events?
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

+ 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] Thrashing VBA Memory Leaks. Memory Loop Problems. Uncleared Memory in .Match Range Object
    By Doc.AElstein in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2017, 05:17 PM
  2. Creating new workbook, saving as csv and then closing - but closing always fails.
    By ella626 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-28-2014, 10:05 PM
  3. Not Enough Memory and Closing Application
    By Buddyboy35 in forum Excel General
    Replies: 2
    Last Post: 12-02-2013, 12:40 AM
  4. Allow saving upon closing a workbook even when saving is disabled.
    By Tino XXL in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-13-2011, 09:09 AM
  5. closing a workbook without saving and closing a workbook with saving enabled
    By stanigator in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-24-2007, 02:15 PM
  6. [SOLVED] saving before closing
    By Jason Zischke in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2005, 05:10 AM
  7. closing opened workbook/app in memory
    By Alex in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2005, 05:06 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