Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Created a collection and will need to reset it to zero
once it has been compiled so that it can be compiled with other data. Dim cTraders As New Collection On Error Resume Next For Each rCell In Range(Cells(65536, 1).End(xlUp), Cells (2, 1)) cTraders.Add rCell.Value, rCell.Value Next rCell On Error GoTo 0 I need a line here to reset the collection to zero so that when i move on the next worksheet the collection will be different. Thanks!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tony,
Set the collection to Nothing. E.g., Set cTraders = Nothing -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Tony Di Stasi" wrote in message ... Created a collection and will need to reset it to zero once it has been compiled so that it can be compiled with other data. Dim cTraders As New Collection On Error Resume Next For Each rCell In Range(Cells(65536, 1).End(xlUp), Cells (2, 1)) cTraders.Add rCell.Value, rCell.Value Next rCell On Error GoTo 0 I need a line here to reset the collection to zero so that when i move on the next worksheet the collection will be different. Thanks!! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub AAA()
Dim cTraders As New Collection On Error Resume Next For Each rCell In Range(Cells(65536, 1).End(xlUp), Cells(2, 1)) cTraders.Add rCell.Value, rCell.Value Next rCell On Error GoTo 0 Debug.Print cTraders.Count For i = 1 To cTraders.Count cTraders.Remove cTraders.Item(1) Next Debug.Print cTraders.Count End Sub -- Regards, Tom Ogilvy "Tony Di Stasi" wrote in message ... Created a collection and will need to reset it to zero once it has been compiled so that it can be compiled with other data. Dim cTraders As New Collection On Error Resume Next For Each rCell In Range(Cells(65536, 1).End(xlUp), Cells (2, 1)) cTraders.Add rCell.Value, rCell.Value Next rCell On Error GoTo 0 I need a line here to reset the collection to zero so that when i move on the next worksheet the collection will be different. Thanks!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Does anybody have a CD collection template | Excel Discussion (Misc queries) | |||
sheet collection | Excel Programming | |||
Is a Collection the best option? | Excel Programming | |||
Is a Collection the best option? | Excel Programming | |||
Sum textboxes in a collection | Excel Programming |