View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default Maximum number of controls on a user form

Hi
How many controls do you have? It should just be limited by memory if i
remember correctly.

Also, a code module is limited to 64K, and around/above that limit, I have
seen strange behavior occuring. The following addin for the vba Editor has a
toolbar showing the size of the active code module:
<http://www.bmsltd.ie/VBETools/Default.htm

You could push code to general modules. You could also create a Class for
each tab of the multipage, then handle the code there (declare a class
variable for each control and handle the behavior in the class). With 1
Class module per Tab, that would cut down the lines-of-code/module.

--
Regards,
Sébastien
<http://www.ondemandanalysis.com
<http://www.ready-reports.com


"Ken Warthen" wrote:

Can anyone tell me if there is a maximum number of controls that Excel can
handle on a user form? I have a user form with a multi-page control on which
there are many textfields, labels, and command buttons. The form recently
stopped being visible when run and crashes Excel. I ran into a similar
situation years ago with MS Access, so I wouldn't be surprised if that might
be causing my problem. I've also gotten error messages stating that my
procedures are too long, so I had to break them up into smaller subroutines.
Any help is greatly appreciated.

Ken Warthen