Maximum Controls on UserForms

S

Steve

What is the maximum number of controls that can held in a userform. I've got
a lot (several hundred) on one and keep getting a "Compile Error: Out of
Memory" message when previewing the userform. I began deleting controls until
the userform would preview successfully. Thanks.
 
S

Spreadsheet Solutions

I thought 128, but that might be wrong.
Anyway, stick to this rule, if possible.
Research has prooven that people are able to be aware of only 7 or 8
different pictures or objects on a paper.

So several hundred might scare them...
 
N

NickHK

Steve,
I just made a quick test with 200 text boxes and 200 labels, which compiles.
However, whether several hundred controls is a good UI design is another
question.

What about using list box, list views, grid control etc instead ?

NickHK
 
P

Peter T

I expect any limit with VBA userforms is dependent on a combination of
things besides simply the number of controls, events in the userform code
module perhaps. (VB Forms I believe are limited to 254 controls if not in a
ControlArray).

Here's an example with 700 controls that the OP seemed to want

http://tinyurl.com/yatwuu

Regards,
Peter T
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top