ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Maximum Controls on UserForms (https://www.excelbanter.com/excel-programming/379761-maximum-controls-userforms.html)

Steve

Maximum Controls on UserForms
 
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.

Spreadsheet Solutions

Maximum Controls on UserForms
 
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...

--
--
Mark Rosenkrantz
--
Spreadsheet Solutions
Witkopeend 24
1423 SN, Uithoorn
Netherlands
--
W: www.rosenkrantz.nl
E:
--
"Steve" wrote in message
...
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.




NickHK

Maximum Controls on UserForms
 
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

"Steve" wrote in message
...
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.




Peter T

Maximum Controls on UserForms
 
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

"Steve" wrote in message
...
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.





All times are GMT +1. The time now is 08:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com