Question: I'm currently building an Excel 2003 app that requires a horribly complex form and am worried about limitations on the number of controls. It currently has 154 controls (counted using `Me.Controls.Count` - this should be accurate, right?) but is probably only about a third complete. The workflow really fits a single form, but I guess I can split it up if I really have to.

I see evidence in a Google search that VB6 (this usually includes VBA) has a hard limit of 254 controls in a form. However, I created a dummy form with well over 1200 controls which still loaded and appeared to work just fine.

I did get some 'out of memory' errors when trying to add specific combinations of controls though, say 800 buttons and 150 labels, leading me to think that any limit might be affected by the memory requirements of each type of control.

Does anyone have any information that might help ensure that I or, more importantly, other users with differing environments don't run into any memory issues with such a large form?

Answer: 
No hard n soft rule...
----------------------

---

There is no definite number of controls that VBA will limit you to.  

It is entirely dependent on the system you run it on. 

As a general rule of thumb:

* Reduce the number of controls.
* Use grid controls instead of arrays of buttons.
* Split it into logical forms for further simplicity.
* Use [lightweight controls](http://support.microsoft.com/kb/184687) (handle-less controls) as they consume less memory.

Apart from this, if you still are using more than 100 controls on the screen (as you say you are) then its time you hired a new UI designer for the project.

GoodLUCK!!

**PS**: Do try and split the form up, if possible.  

I can't imagine using any software that throws up 154 controls in one screen.  

(MS-WORD comes pretty close ;-) )

---

**UPDATE:** Some stuff for your reference below...

> 
> * <http://support.microsoft.com/kb/q177842/>
> 
> 
>
I try to stay away from userforms that are this big. I much prefer to use the spreadsheet to handle the data collection for things this big. If there are dependencies, then I hide/unhide rows as necessary, or use multiple sheets. I find it is an easier solution (sometimes).