Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Userform size limitation

In my Excel-Addin I use lots of userforms (about 30) and there are lots of
code modules (about 30.000 LOC).

One of the userforms is quite complex, as there are several nested multipage
objects in there, which contain several textboxes, labels and the like. Now
I have come to the point where adding one single object to the userform
causes Excel to crash at accessing comboboxes (e.g. when accessing
..ListCount or .ListIndex property) at runtime. The project compiles fine,
but at runtime the first access to the above mentioned properties kills
Excel. The .AddItem or .RemoveItem methods work fine...

Moreover, I could only track down the problem by "wrapping" the userform
object into an object variable (the userform I'm talking about is named
"GewinnverteilungG":

'....
dim gg as object, z as long
set gg = GewinnverteilungG
with gg
.combobox1.clear
for z=1 to 17
.combobox1.additem str$(z)
next
.combobox1.listindex=0 <<<< crashes here, with error message
'...some other stuff...
end with
'...

executing this code gets me an error message that member function
".ListIndex" is not found in combobox.
When I leave the object assignment away, using

dim z as long
'....
with GewinnverteilungG
.combobox1.clear
for z=1 to 17
.combobox1.additem str$(z)
next
.combobox1.listindex=0 <<<< crashes here, without error message
' ...some other stuff...
end with

Excel doesn't even give me an error message on what's going wrong. I have
tried nearly everything, including completely rebuilding the userform,
cleaning the xls (i.e. exporting all the forms an modules, and re-importing
them into a new xls). The problem remains, only removing the last added
object (or any other!) fixes it.

So the only conclusion for me is that Excel just cannot handle this userform
anymore as it obviously is too big. It contains approximately 600 objects
(icons, comboboxes, listboxes, labels, optionbuttons, checkboxes,
multipages).

If I split the userform up into two several UF's, the problem is also gone.

So, does anyone out there know whether there is such a size limitation for
UF's?

Greetings and thanks in advance,
Michael Harrer


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
Excel file size limitation Stew_Katz Excel Discussion (Misc queries) 5 April 10th 10 07:45 AM
Excel Chart Series Values Property Size Limitation Pete Charts and Charting in Excel 9 January 14th 08 03:03 PM
Userform Size Richard Excel Programming 1 May 27th 04 12:16 PM
Array size limitation? QuocAnh Excel Programming 9 November 21st 03 11:34 PM
SheetSelectionChange Target size Limitation? Guillaume E. Excel Programming 1 September 27th 03 04:34 PM


All times are GMT +1. The time now is 10:16 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"