+ Reply to Thread
Results 1 to 3 of 3

Macro runs successfully but displays "Out of Memory" error at end

  1. #1
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    Macro runs successfully but displays "Out of Memory" error at end

    So I am creating a macro that I provide for a number of users to run on their own computer. In this version of the macro, I included some code that brings in a macro from a workbook at a different location to the "ThisWorkbook" module so the code executes upon the user saving their file.

    The macro does some other generic stuff as well, but in testing this macro, occasionally I get an "Out of Memory" error after running the macro, but the macro still completes successfully. Any ideas on what the issue could be? Is it stemming from the added code below to bring in the macro from a different file as I wasn't typically getting this error before with this macro.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Macro runs successfully but displays "Out of Memory" error at end

    do you get the error if you save wbk (the destination book) before closing the sourcebook?

    Is there any event code that you are transfering?
    What happens if you put a breakpoint and step through the code?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Macro runs successfully but displays "Out of Memory" error at end

    Or .. place OPTION EXPLICIT at the top of the macro and see if there is an error that VBA recognizes.

    Taking a stab here ... does this line
    Please Login or Register  to view this content.
    run though
    all 1.4 million rows of the worksheet ? If so, perhaps that is causing the out of memory issue ?

+ 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] Macro gets "Run time error '7' out of memory" for ReDim Array
    By capson in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-10-2014, 12:52 PM
  2. Replies: 1
    Last Post: 07-06-2014, 04:20 PM
  3. [SOLVED] Code displays error message reading "type mismatch"
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-12-2014, 09:32 AM
  4. [SOLVED] "not enough memory" error on workbook.save , but not .close(SaveChanges:=True)
    By sylvainsylvain in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-18-2013, 12:08 PM
  5. "Not Enough memory to display" error when dropdown values in combo are selected
    By pabs1234 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-10-2012, 02:49 PM
  6. Loop to populate graph -- Excel "runs out of memory"?
    By Dante_Blake in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-20-2011, 01:55 PM
  7. Macro that runs entered value through "low" and "high" range
    By Vika.F in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2005, 03:35 AM

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