VBA Out of Memory

Discussion in 'AutoCAD' started by Anthony, Oct 21, 2004.

  1. Anthony

    Anthony Guest

    I've got a really big form (100s of objects on a multipage object). And I
    added a few more objects, and now I get out of memory errors, am I running
    up against some artifical boundary in VBA? Or is it my settings? I tried it
    on a few computers and I get the same results so I'm thinking the former.

    -Anthony F
     
    Anthony, Oct 21, 2004
    #1
  2. Anthony

    Anthony Guest

    It looks like it seems to error out at around 1208 objects (plus the form,
    so 1209 is the max it seems - I used form.controls.count to figure it out).

    -A
     
    Anthony, Oct 21, 2004
    #2
  3. Anthony

    Ed Jobe Guest

    So you're saying, that if you delete one of the controls, down to 1207, you
    don't get the error?
     
    Ed Jobe, Oct 21, 2004
    #3
  4. Anthony

    Anthony Guest

    Correct. No matter how many lines of code I add or remove, if I delete one
    control the error goes away.

    -A
     
    Anthony, Oct 21, 2004
    #4
  5. Anthony

    Ed Jobe Guest

    Instead of having all the controls on one form, have you thought about
    multiple forms, e.g. a button that opens a subform?
     
    Ed Jobe, Oct 21, 2004
    #5
  6. Anthony

    Anthony Guest

    Yea, I'm refactoring the form's layout now. Its more lines of code to
    manage, but since I ran into the limit of how many objects I can have on one
    form before I hit the limit of how many lines of code I can have in one code
    segment, I'm going to add more code. Oh well, I'll prolly just rewrite it in
    ..net soon enough anyways...

    -Anthony
     
    Anthony, Oct 21, 2004
    #6
  7. Anthony

    Anthony Guest

    Yea, I'm refactoring the form's layout now. Its more lines of code to
    manage, but since I ran into the limit of how many objects I can have on one
    form before I hit the limit of how many lines of code I can have in one code
    segment, I'm going to add more code. Oh well, I'll prolly just rewrite it in
    ..net soon enough anyways...

    -Anthony
     
    Anthony, Oct 21, 2004
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.