supporting the "for each" statement in a custom collection

C

Chip Orange

I've created a collection class in a library add-in template for my
organization, and all is well with the exception that "FOR EACH" doesn't
work. I've added the following property to the class (found in VB & VBA in
a nutshell), but it hasn't made any difference:

Public Property Get NewEnum() As IUnknown
Set NewEnum = mCol.[_NewEnum]
End Property


It does also speak of changing the procedure ID property, which I take it
only applies to VB and not VBA classes?

Can anyone point out what I'm missing?

thanks.

Chip
 
S

Steve Hudson

G'day "Chip Orange"

purchase, love and sleep with your VBA Developer's Handbook which
perfectly describes everything about what you are doing.

Basically its an export to frm and hand edit a property in. The book
is well worth its purchase price many times over - just do it ;-)


I've created a collection class in a library add-in template for my
organization, and all is well with the exception that "FOR EACH" doesn't
work. I've added the following property to the class (found in VB & VBA in
a nutshell), but it hasn't made any difference:

Public Property Get NewEnum() As IUnknown
Set NewEnum = mCol.[_NewEnum]
End Property


It does also speak of changing the procedure ID property, which I take it
only applies to VB and not VBA classes?

Can anyone point out what I'm missing?

thanks.

Chip

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

If answers r 2 terse, ask again or hassle an MVP,
at least they get recognition for it then.
Lengthy replies offlist require payment.
 
C

Chip Orange

I don't mind purchasing it, but I'm blind and limited to audio or etext
books.

I'll go see if this is available in an e-text format that I can use
(unfortunately, the ones from Amazon aren't usable by someone who is blind).

thanks,

Chip


Steve Hudson said:
G'day "Chip Orange"

purchase, love and sleep with your VBA Developer's Handbook which
perfectly describes everything about what you are doing.

Basically its an export to frm and hand edit a property in. The book
is well worth its purchase price many times over - just do it ;-)


I've created a collection class in a library add-in template for my
organization, and all is well with the exception that "FOR EACH" doesn't
work. I've added the following property to the class (found in VB & VBA in
a nutshell), but it hasn't made any difference:

Public Property Get NewEnum() As IUnknown
Set NewEnum = mCol.[_NewEnum]
End Property


It does also speak of changing the procedure ID property, which I take it
only applies to VB and not VBA classes?

Can anyone point out what I'm missing?

thanks.

Chip

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

If answers r 2 terse, ask again or hassle an MVP,
at least they get recognition for it then.
Lengthy replies offlist require payment.
 

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