How to Implement support for enumeration (For Each) in a collection class in Excel ?

R

Radu

Hi. I have created a collection class, and I would like to allow the
user of this class to enumerate (using 'for each').

In VB I would use

Function NewEnum() As IUnknown
'Implement support for enumeration (For Each)
Set NewEnum = m_colTruckingCharges.[_NewEnum]
End Function

But in Excel IUnknown does not show in my object browser, and when I
try to use it, I get "Object doesn't support this property or method".

Can this be done in Excel ? How ? Do I need to set a specific
reference, maybe ?

Thanks a lot for your time.
Alex
 
R

RB Smissaert

Read this post:
How To: Collections in VBA in Excel and probably other MS Office 2003
applications.
dated 16 December 2005 in the newsgroup:
microsoft.public.excel.programming

RBS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top