View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Clearing a Collection


If you declare your collection as...

Dim collMyCollection as Collection
Set collMyCollection = New Collection

Then you can set the collection to nothing to clear it...
Set collMyCollection = Nothing
(providing you have not used another object to also reference the collection)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Max"
wrote in message
I have created a collection using:
dim collMycollection as new collection
and populated it. Now I want to clear it and reuse it. What is the command
to do so? I've tried:

collMycollection.clear

But that doesn't seem to be supported. Any ideas?
--
Thanks!
Max