Results 1 to 9 of 9

Thread: Userform limit

  1. #1
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    706
    Login to Give a bone
    0

    Default Userform limit

    Is there a limit to how many userforms one VB program can have? just curious because I have a big 'ol master VB program that launches a ton of other "programs" (different userforms) and was wondering if I'll hit a limit some day... or if this will eventually slow things down.

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Userform limit

    I'm not aware of any such limit, other than memory. If you run into a problem later, you can break your project up into smaller projects.
    C:> ED WORKING....


    LinkedIn

  3. #3
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Userform limit

    Agreed.

    Also, in case you don't know about this..... Be sure to open VBAMAN periodically, and run a SaveAs on your DVB file. The file size should be much smaller.
    R.K. McSwain | CAD Panacea |

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Userform limit

    Quote Originally Posted by rkmcswain
    The file size should be much smaller.
    Temporarily. Doing SaveAs only strips out the compiled code, saving the ascii portion known as pseudo code. As soon as vba compiles it again, the size will be similar to before the SaveAs.
    C:> ED WORKING....


    LinkedIn

  5. #5
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    706
    Login to Give a bone
    0

    Default Re: Userform limit

    Is that why when I take my VBA program home to work on it, overwriting what was done the previous night, the file size seems to flop around from large to small and then back again? i'm constantly adding stuff to the program so it should only be getting bigger. I figured it had something to do with the different computers I was running and saving it on from one place to the other.

    I also assume by "ascii portion" you mean the "stuff" we actually type into the code portion of the program? I didn't know it added other compiled "stuff".

  6. #6
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Lightbulb Re: Userform limit

    Quote Originally Posted by Ed Jobe
    Temporarily. Doing SaveAs only strips out the compiled code, saving the ascii portion known as pseudo code. As soon as vba compiles it again, the size will be similar to before the SaveAs.
    Not exactly.

    I have a 4.9MB DVB file.

    After a SaveAs, the size goes to 1.9MB.

    After a compile of that 1.9MB version, then a save, the file size is 3.6MB - so it still shed 1.3MB of something, somewhere.....
    R.K. McSwain | CAD Panacea |

  7. #7
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Userform limit

    Other things can affect it, e.g. the controls you use.
    C:> ED WORKING....


    LinkedIn

  8. #8
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Userform limit

    Quote Originally Posted by Ed Jobe
    Other things can affect it, e.g. the controls you use.
    True. That was my only point. That a periodic "SaveAs" can sort of "purge" your file....
    R.K. McSwain | CAD Panacea |

  9. #9
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Userform limit

    Yeah, I wouldn't expect anything dramatic though. Sometime people propose that and they don't go back later to check the filesize, not realizing that compilation takes place.
    C:> ED WORKING....


    LinkedIn

Similar Threads

  1. Room: Upper Limit and Limit offset
    By nnguyen in forum Revit Architecture - General
    Replies: 5
    Last Post: 2013-01-21, 10:30 AM
  2. Unload a userform
    By mikeosborne in forum VBA/COM Interop
    Replies: 2
    Last Post: 2009-09-28, 08:35 PM
  3. All I want is a Userform to show..
    By Coolmo in forum Dot Net API
    Replies: 5
    Last Post: 2009-07-23, 02:03 PM
  4. VBA userform in excel
    By Streng in forum VBA/COM Interop
    Replies: 3
    Last Post: 2009-02-17, 07:02 PM
  5. Userform sizing
    By Coolmo in forum VBA/COM Interop
    Replies: 7
    Last Post: 2006-05-30, 11:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •