+ Reply to Thread
Results 1 to 4 of 4

Excel VBA Form "Not enough system resources to display completely."

  1. #1
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    N/A
    MS-Off Ver
    N/A
    Posts
    373

    Excel VBA Form "Not enough system resources to display completely."

    Hello all-

    I have a VBA application running in Excel that pulls data from an Access database and loads the information into a UserForm. The UserForm dynamically removes and then re-allocates the needed controls based on the amount of items listed in the data pull. The problem I am running into is that after a period of time (usually hours) the UserForm will fail to operate properly and/or crash with the message "Not enough system resources to display completely." Is there any work around or fix for this issue?

    Thank you,

    Will

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,622

    Re: Excel VBA Form "Not enough system resources to display completely."

    Sounds as though you are creating and setting objects and not clearing them down again.

    For example:

    Please Login or Register  to view this content.
    Ideally, when you finish with things, you should set them equal to nothing, in reverse order

    Please Login or Register  to view this content.

    A lot of the time it won't matter but if you are constantly looping and creating objects, it probably does.

    Not easy to be more specific without seeing the code (ideally in a sample workbook)

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor
    Join Date
    02-06-2014
    Location
    N/A
    MS-Off Ver
    N/A
    Posts
    373

    Re: Excel VBA Form "Not enough system resources to display completely."

    I've figured out what was causing the memory creep, the controls that were added (CommandButton / Label) still had their contents in memory after being removed using the 'Controls.Remove' method, specifically I was applying an icon image file to each row of buttons and a string to each label, by setting the CommandButton.Picture property to null and Label.Caption property to null I was able to eliminate the memory creep.

    Please Login or Register  to view this content.
    Last edited by 1aaaaaaaaaaaaaaa; 01-31-2015 at 07:39 AM.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,622

    Re: Excel VBA Form "Not enough system resources to display completely."

    Thanks for the update. I'm sure it will raise awareness and benefit others in the future.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. How to avoid error " Not enough system resources to display completely"?
    By ANUARORA in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-01-2014, 03:29 AM
  2. "Not enough resources to display completely" error upon entirerow.delete
    By michaeljoeyeager in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2012, 08:52 AM
  3. Replies: 1
    Last Post: 03-02-2006, 08:10 AM
  4. [SOLVED] Plot Wizard -- "Not enough system resources to display completely.
    By Andrew in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-25-2005, 08:06 PM
  5. Plot Wizard - "Not enough system resources to display completely."
    By Drewstees in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-24-2005, 04:11 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