Clear collection of all members? 
Author Message
 Clear collection of all members?

What is the most efficient way to clear all members fom a collection?

I'd think there would be a MyCollection.Clear method or something but there
does not appear to be.

Do I have to loop through each member and delete it explicitly?

Thanks - Mike



Fri, 20 Aug 1999 03:00:00 GMT  
 Clear collection of all members?

I'm not sure whether this will work all right, but I think you should
destroy and recreate the colection object:

set MyCollection = Nothing

It should destroy the collection object and all the object contained by the
collection..

Hope this help (and work)

===================================
Pedro J. Rusjan

http://www.mug.org.ar/socios/pedro.rusjan
===================================



Quote:
> What is the most efficient way to clear all members fom a collection?

> I'd think there would be a MyCollection.Clear method or something but
there
> does not appear to be.

> Do I have to loop through each member and delete it explicitly?

> Thanks - Mike



Fri, 20 Aug 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. copy collection member’s data to another member

2. Clearing members of a UDT

3. Members collection on distlist item

4. Removing ALL members of a Collection using For Each

5. Accessing Members collection in AddressEntry Ojbect

6. AddressEntries members collection returns ridiculous error

7. Hiding a member of the tabs collection

8. Collections: Testing for existence of members

9. VB Collection Member Modify

10. Making object aware of changes to collection members

11. How to display collection member on a form

12. Need elegant but simple collection members

 

 
Powered by phpBB® Forum Software