Collections Class For Each Next
I have created class modules in my Excel VBA project that each include a private collection object. I am trying to leverage the "house of bricks" model whereby the class will only add and return an instance of a specific object. My problem is that from the code module that creates the instance of the collection class I cannot use For Each...Next iteration to step through the collection. In VB6, I've used NewEnum to return an IUnknown after setting Procedure Attributes and ID. In VBA I get error 438: Object doesn't support this property or method. Is there any way to enable For Each...Next in VBA or am I going to be stuck stepping through the collection old-school Thanks!

Collections Class For Each Next
sindhu
Richard Broida
Chip Pearson explains how to do this in the regular Excel newsgroups:
http://groups.google.com/group/microsoft.public.excel.programming/browse_thread/thread/ae9097dd187c4b50/105e690310dec08f lnk=st&q=newenum+group%3A*microsoft*+insubject%3Asetting+insubject%3Aprocedure+insubject%3Aattributes+author%3Apearson&rnum=1&hl=en#105e690310dec08f
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______