ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   collection and limit (https://www.excelbanter.com/excel-programming/379556-collection-limit.html)

--== Alain ==--

collection and limit
 
Hi,

I have a collection object and it seems limited to 256 items.
How is it possible to increase this limit ?

thanks a lot,

Al.

Peter T

collection and limit
 
Hi,

I have a collection object and it seems limited to 256 items.
How is it possible to increase this limit ?



Sub test()
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")

End Sub

Is there something special about your particular collection

Regards,
Peter T



--== Alain ==--

collection and limit
 
It's a simple collection with 21000 records...nothing special

Peter T wrote:
Hi,

I have a collection object and it seems limited to 256 items.
How is it possible to increase this limit ?



Sub test()
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")

End Sub

Is there something special about your particular collection

Regards,
Peter T



RichardSchollar

collection and limit
 
Alain

How are you creating your collection? Can you post the code you have?

Richard


--== Alain ==-- wrote:
It's a simple collection with 21000 records...nothing special

Peter T wrote:
Hi,

I have a collection object and it seems limited to 256 items.
How is it possible to increase this limit ?



Sub test()
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")

End Sub

Is there something special about your particular collection

Regards,
Peter T




JLGWhiz

collection and limit
 
I am beginning to wonder if Alain is a real person or a virus.

"RichardSchollar" wrote:

Alain

How are you creating your collection? Can you post the code you have?

Richard


--== Alain ==-- wrote:
It's a simple collection with 21000 records...nothing special

Peter T wrote:
Hi,

I have a collection object and it seems limited to 256 items.
How is it possible to increase this limit ?


Sub test()
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")

End Sub

Is there something special about your particular collection

Regards,
Peter T





--== Alain ==--

collection and limit
 
Sorry but i'm not a virus !


JLGWhiz wrote:
I am beginning to wonder if Alain is a real person or a virus.

"RichardSchollar" wrote:

Alain

How are you creating your collection? Can you post the code you have?

Richard


--== Alain ==-- wrote:
It's a simple collection with 21000 records...nothing special

Peter T wrote:
Hi,

I have a collection object and it seems limited to 256 items.
How is it possible to increase this limit ?

Sub test()
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")

End Sub

Is there something special about your particular collection

Regards,
Peter T




[email protected]

collection and limit
 
It's not the collection that's limited, but the Watch window. I've
added well more than 256 items to collections, only to be tricked by
what displays in the watch window.


--== Alain ==-- wrote:
Sorry but i'm not a virus !


JLGWhiz wrote:
I am beginning to wonder if Alain is a real person or a virus.

"RichardSchollar" wrote:

Alain

How are you creating your collection? Can you post the code you have?

Richard


--== Alain ==-- wrote:
It's a simple collection with 21000 records...nothing special

Peter T wrote:
Hi,

I have a collection object and it seems limited to 256 items.
How is it possible to increase this limit ?

Sub test()
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")

End Sub

Is there something special about your particular collection

Regards,
Peter T






All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com