View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Reset New Collection

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!!