LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Number of UserForm Control Objects

Well, that's good to know, then. I don't think I can break it up enough to
get down to 100/form, but I think just seperating the tabs into their own
userform may eliminate a whole bunch of headaches.

Thanks for that, Jon. :)

"Jon Peltier" wrote:

I've heard anecdotal evidence of an apparent behavioral limit of "about 250"
controls per userform. This is similar to VB's hard 256 limit on control
names, but probably unrelated. I had problems with one userform with around
350, but a redesign brought it under 100 and everyone was happy.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"NickHK" wrote in message
...
Whilst VB6 forms have a limit of 255 (256 ?) names of controls, this works
fine in VBA/Forms2:

Private Sub CommandButton1_Click()
Dim i As Long
Dim Lab As msforms.Label

For i = 1 To 5000
With Me.Controls
Set Lab = .Add("Forms.Label.1", "Label" & i)
Lab.Caption = "Number " & i
End With
Next

End Sub

So I doubt the OP problem is directly caused by too many controls,
although
I doubt 1200 controls would make a manageable UI.

NickHK

"Jim Rodgers" wrote in message
...

It sure is tricky to make control arrays in VBA, especially since VBA

does
not support control arrays.

I would suggest studying a decent VBA resource.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


I was just trying to be helpful.

I do not write much in VBA, but you must admit it is in most ways

identical
to VB6. I've written about a half a million lines of that stuff. More

than
I can remember sometimes. Coding VB is not my main profession anymore.

"I would suggest studying a decent VBA resource."

Decent? Hmmmph. Your remarks were perceived as unfriendly, S.A. I bet

you
think you wrote a decent VBA resource, eh? (By the way, you CAN go broke
underestimating the intelligence of your fellow man.)






 
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
Userform Objects Kaval Excel Programming 2 August 22nd 08 10:38 AM
Selecting control on userform with part of control name (set question) Keith Excel Programming 4 January 10th 07 02:24 PM
Control Objects missing when opened on one pc. Kerry Excel Programming 2 April 13th 06 08:30 PM
control toolbox objects and formulas Gixxer_J_97[_2_] Excel Programming 3 May 5th 05 04:12 PM
Control objects in Excel packat[_2_] Excel Programming 2 December 29th 04 06:46 PM


All times are GMT +1. The time now is 08:12 PM.

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

About Us

"It's about Microsoft Excel"