Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default Limitation to Collection Object

I am using excel 2000 and trying to add 500 elements to a collection.

The collection will only add 256 elements. Is there a limit to the numer of
elements?

What about in excel 2003?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Limitation to Collection Object

not sure if this is relevant, but this is excel 2003

Worksheet arrays Limited by available memory. Also, arrays cannot refer to
entire columns. For example, an array cannot refer to the entire column C:C or
to the range C1:C65536. However, an array can refer to the range C1:D65535
because the range is one row short of the maximum worksheet size and does not
include the entire C or D column


http://office.microsoft.com/en-us/ex...992911033.aspx


http://office.microsoft.com/en-us/ex...738491033.aspx
--


Gary


"Keith" wrote in message
...
I am using excel 2000 and trying to add 500 elements to a collection.

The collection will only add 256 elements. Is there a limit to the numer of
elements?

What about in excel 2003?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default Limitation to Collection Object

thanks for the post, but still does not answer the core question:

I beleive the collection only will hold 256.

an array is different from a collection.


"Gary Keramidas" wrote:

not sure if this is relevant, but this is excel 2003

Worksheet arrays Limited by available memory. Also, arrays cannot refer to
entire columns. For example, an array cannot refer to the entire column C:C or
to the range C1:C65536. However, an array can refer to the range C1:D65535
because the range is one row short of the maximum worksheet size and does not
include the entire C or D column


http://office.microsoft.com/en-us/ex...992911033.aspx


http://office.microsoft.com/en-us/ex...738491033.aspx
--


Gary


"Keith" wrote in message
...
I am using excel 2000 and trying to add 500 elements to a collection.

The collection will only add 256 elements. Is there a limit to the numer of
elements?

What about in excel 2003?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Limitation to Collection Object

On Aug 21, 5:24 pm, Keith wrote:
thanks for the post, but still does not answer the core question:

I beleive the collection only will hold 256.

an array is different from a collection.

"Gary Keramidas" wrote:
not sure if this is relevant, but this is excel 2003


Worksheet arrays Limited by available memory. Also, arrays cannot refer to
entire columns. For example, an array cannot refer to the entire column C:C or
to the range C1:C65536. However, an array can refer to the range C1:D65535
because the range is one row short of the maximum worksheet size and does not
include the entire C or D column


http://office.microsoft.com/en-us/ex...992911033.aspx


http://office.microsoft.com/en-us/ex...738491033.aspx
--


Gary


"Keith" wrote in message
...
I am using excel 2000 and trying to add 500 elements to a collection.


The collection will only add 256 elements. Is there a limit to the numer of
elements?


What about in excel 2003?


Hello Keith,

If you are trying to add items to a system collection object, you may
have reached that collection object's limit. You failed to mention the
object you are working with. Gary is right in that a collection is
limited only by available memory. The Item and Count properties are
both Long integers which means the maximum number or items in the
collection is 16.7 million.

Sincerely,
Leith Ross

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Limitation to Collection Object

In case - don't be misled by the 256 limit you can see in Locals or in a
Watch.

Dim i As Long
Dim col As Collection

Set col = New Collection
For i = 1 To 20000
col.Add i, CStr(i)
Next

MsgBox col("20000")

Regards,
Peter T

"Keith" wrote in message
...
thanks for the post, but still does not answer the core question:

I beleive the collection only will hold 256.

an array is different from a collection.


"Gary Keramidas" wrote:

not sure if this is relevant, but this is excel 2003

Worksheet arrays Limited by available memory. Also, arrays cannot

refer to
entire columns. For example, an array cannot refer to the entire column

C:C or
to the range C1:C65536. However, an array can refer to the range

C1:D65535
because the range is one row short of the maximum worksheet size and

does not
include the entire C or D column


http://office.microsoft.com/en-us/ex...992911033.aspx


http://office.microsoft.com/en-us/ex...738491033.aspx
--


Gary


"Keith" wrote in message
...
I am using excel 2000 and trying to add 500 elements to a collection.

The collection will only add 256 elements. Is there a limit to the

numer of
elements?

What about in excel 2003?








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
Characters Object limitation? Kobus[_2_] Excel Programming 11 March 20th 07 05:12 PM
Adding Name object to a collection does not add an object Tim Richardson Excel Programming 5 October 8th 06 01:28 PM
Limitation of collection and dictionary datatype iamrajy[_7_] Excel Programming 1 January 27th 06 04:58 PM
Collection Object, 255 item limitation timothy[_2_] Excel Programming 4 September 11th 05 09:43 PM
Characters Object limitation? nguy0531 Excel Programming 1 May 5th 04 11:52 AM


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