Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Maximum number of controls on a user form

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Maximum number of controls on a user form

I have 935 controls on my userform. You think that's too many? I suppose I
could use separate forms, but I liked the idea of using a multipage control
on a single form. I guess it's more important for the application to work
than have a pleasing user interface that doesn't work.

Ken

"sebastienm" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Maximum number of controls on a user form

I have 935 controls on my userform

I don't think that should be a problem, although I don't have a form with
that many.
Have a form with over 500 controls and no problem there.
I think the 2 most important things to keep your project healthy a
Firstly, have Option Explicit at the top of every module and make sure that
the project can always compile.
Secondly, with large projects like this, after every save run a code
cleaner.
This is a free one:
http://www.appspro.com/Utilities/CodeCleaner.htm
I use the commercial Excel Workbook Rebuilder from Andrew Baker:
http://www.vbusers.com/commercial/commercial.asp
and I think that is better and worth the modest fee.

Module size below 64K is often mentioned, but I have seen no problems if you
go a bit over that.
At one stage I thought that the number of modules could be a problem (more
than 100), but this doesn't matter.

RBS


"Ken Warthen" wrote in message
...
I have 935 controls on my userform. You think that's too many? I suppose
I
could use separate forms, but I liked the idea of using a multipage
control
on a single form. I guess it's more important for the application to work
than have a pleasing user interface that doesn't work.

Ken

"sebastienm" wrote:

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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Maximum number of controls on a user form

That's a lot.
Does each Page of the Multipage have similar controls?

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


"Ken Warthen" wrote:

I have 935 controls on my userform. You think that's too many? I suppose I
could use separate forms, but I liked the idea of using a multipage control
on a single form. I guess it's more important for the application to work
than have a pleasing user interface that doesn't work.

Ken

"sebastienm" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Maximum number of controls on a user form

That's a lot.
How many pages do you have in the Multipage? And does all pages have more or
less similar controls?

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


"Ken Warthen" wrote:

I have 935 controls on my userform. You think that's too many? I suppose I
could use separate forms, but I liked the idea of using a multipage control
on a single form. I guess it's more important for the application to work
than have a pleasing user interface that doesn't work.

Ken

"sebastienm" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number Format Controls on a User Form ChelseaWarren Excel Programming 2 February 24th 06 02:16 AM
User form controls add nath Excel Programming 1 May 26th 04 10:58 AM
User Form Controls Tom Ogilvy Excel Programming 0 August 29th 03 12:42 PM
User Form Controls Zaid Qureshi Excel Programming 0 August 29th 03 12:40 PM
User Form Controls Zaid Qureshi Excel Programming 0 August 29th 03 12:40 PM


All times are GMT +1. The time now is 02:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"