+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] Insufficent resources to display a form

  1. #1
    Lionel M Fridjhon
    Guest

    [SOLVED] Insufficent resources to display a form

    I have written a VBA program for Excel that has a fairly large userform with
    listboxes, text boxes, frames and labels, as well as a few command buttons.
    (about 100 counting all objects on the form)
    When I show the form in Excel, or when I select the form in VBA, I get a
    message that says there are insufficient resources to display properly.
    Usually the system allows me to continue, but periodically it just crashes,
    and I have to reboot.
    Is there a limit to the number of objects one can put on the form, and is
    there a way to increase the resources?
    This program is for a client, and I cannot have the program produce error
    messages which are essentially meaningless to most users.

    Lionel



  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Quote Originally Posted by Lionel M Fridjhon
    I have written a VBA program for Excel that has a fairly large userform with
    listboxes, text boxes, frames and labels, as well as a few command buttons.
    (about 100 counting all objects on the form)
    When I show the form in Excel, or when I select the form in VBA, I get a
    message that says there are insufficient resources to display properly.
    Usually the system allows me to continue, but periodically it just crashes,
    and I have to reboot.
    Is there a limit to the number of objects one can put on the form, and is
    there a way to increase the resources?
    This program is for a client, and I cannot have the program produce error
    messages which are essentially meaningless to most users.

    Lionel

    Hello Lionel,

    There are things you can do to conserve resources. If your Form can be broken down into several separate forms that would be a good start. If you have a lot of graphics don't store them as part of the form but use resource files to loaded from disk when needed. Use data typing with variables. Don't always use the VB default of a Variant Type it uses a lot of memory, especially with arrays. Place reusable code routines in Project Modules (.bas Module). If your have text boxes and have declared a lot of fixed length strings, this can eat up stack space. The only way to release the resources is basically quit your program, or restart the system.

    Hope this helps,
    Leith Ross

  3. #3
    Robin Hammond
    Guest

    Re: Insufficent resources to display a form

    Not that I have experienced, but a lot of clutter can build up in a form
    while it is being designed. Try exporting the form, removing it from your
    project, then importing it back again to get rid of the rubbish. Or have a
    look at Rob Bovey's codecleaner add-in.

    Robin Hammond
    www.enhanceddatasystems.com

    "Lionel M Fridjhon" <[email protected]> wrote in message
    news:[email protected]...
    >I have written a VBA program for Excel that has a fairly large userform
    >with
    > listboxes, text boxes, frames and labels, as well as a few command
    > buttons.
    > (about 100 counting all objects on the form)
    > When I show the form in Excel, or when I select the form in VBA, I get a
    > message that says there are insufficient resources to display properly.
    > Usually the system allows me to continue, but periodically it just
    > crashes,
    > and I have to reboot.
    > Is there a limit to the number of objects one can put on the form, and is
    > there a way to increase the resources?
    > This program is for a client, and I cannot have the program produce error
    > messages which are essentially meaningless to most users.
    >
    > Lionel
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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