Property Get NewEnum in VBA

L

Le, Thanh-Nhan

Hi,
I wrote class clsFiels, what serves as collection for another class
(clsField).
I wrote "Property Get NewEnum" as in VB, but I don't know, as if VBA
supports this method.

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

The code is compiled. But when I use: For each ... in .. then error 438
occurs (Object not supports this property or method)
Dim fld As clsField
For Each fld In oData.Fields
Debug.Print fld.Name
Next fld

Note: oData.Fields is correct

Can anybody help me?

Thanks
Nhan
 
L

Le, Thanh-Nhan

Hi,
Very good.
A question, where can I find a documentation for such procedure attributes?

Thanks
Nhan

Douglas J. Steele said:
IIRC, Peter Walker explains how to do it at
http://www.papwalker.com/ref101/ccol.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Le said:
Hi,
I wrote class clsFiels, what serves as collection for another class
(clsField).
I wrote "Property Get NewEnum" as in VB, but I don't know, as if VBA
supports this method.

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

The code is compiled. But when I use: For each ... in .. then error 438
occurs (Object not supports this property or method)
Dim fld As clsField
For Each fld In oData.Fields
Debug.Print fld.Name
Next fld

Note: oData.Fields is correct

Can anybody help me?

Thanks
Nhan
 
D

Douglas J. Steele

I don't understand your question. Doesn't Peter's article provide the
documentation you need? Or do you mean something else by "documentation"?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Le said:
Hi,
Very good.
A question, where can I find a documentation for such procedure attributes?

Thanks
Nhan

Douglas J. Steele said:
IIRC, Peter Walker explains how to do it at
http://www.papwalker.com/ref101/ccol.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Le said:
Hi,
I wrote class clsFiels, what serves as collection for another class
(clsField).
I wrote "Property Get NewEnum" as in VB, but I don't know, as if VBA
supports this method.

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

The code is compiled. But when I use: For each ... in .. then error 438
occurs (Object not supports this property or method)
Dim fld As clsField
For Each fld In oData.Fields
Debug.Print fld.Name
Next fld

Note: oData.Fields is correct

Can anybody help me?

Thanks
Nhan
 
L

Le, Thanh-Nhan

The article of Peter is very good, I have tried, it works.
I think, there are more procedure attributes than in the article. When it is
so, ich want to have a docu. In MSDN I didn't see any docu about procedure
attributes.

Nhan


Douglas J. Steele said:
I don't understand your question. Doesn't Peter's article provide the
documentation you need? Or do you mean something else by "documentation"?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Le said:
Hi,
Very good.
A question, where can I find a documentation for such procedure attributes?

Thanks
Nhan

Douglas J. Steele said:
IIRC, Peter Walker explains how to do it at
http://www.papwalker.com/ref101/ccol.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Hi,
I wrote class clsFiels, what serves as collection for another class
(clsField).
I wrote "Property Get NewEnum" as in VB, but I don't know, as if VBA
supports this method.

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

The code is compiled. But when I use: For each ... in .. then error 438
occurs (Object not supports this property or method)
Dim fld As clsField
For Each fld In oData.Fields
Debug.Print fld.Name
Next fld

Note: oData.Fields is correct

Can anybody help me?

Thanks
Nhan
 
D

Douglas J. Steele

Sorry, but I don't think you'll find any documentation on the Microsoft
site: stuff like that tends to be ignored with respect to VBA.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Le said:
The article of Peter is very good, I have tried, it works.
I think, there are more procedure attributes than in the article. When it is
so, ich want to have a docu. In MSDN I didn't see any docu about procedure
attributes.

Nhan


Douglas J. Steele said:
I don't understand your question. Doesn't Peter's article provide the
documentation you need? Or do you mean something else by "documentation"?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Le said:
Hi,
Very good.
A question, where can I find a documentation for such procedure attributes?

Thanks
Nhan

Newsbeitrag IIRC, Peter Walker explains how to do it at
http://www.papwalker.com/ref101/ccol.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Hi,
I wrote class clsFiels, what serves as collection for another class
(clsField).
I wrote "Property Get NewEnum" as in VB, but I don't know, as if VBA
supports this method.

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

The code is compiled. But when I use: For each ... in .. then
error
438
occurs (Object not supports this property or method)
Dim fld As clsField
For Each fld In oData.Fields
Debug.Print fld.Name
Next fld

Note: oData.Fields is correct

Can anybody help me?

Thanks
Nhan
 
O

OSMAN SURCHY

Douglas J. Steele said:
IIRC, Peter Walker explains how to do it at
http://www.papwalker.com/ref101/ccol.html

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Le said:
Hi,
I wrote class clsFiels, what serves as collection for another class
(clsField).
I wrote "Property Get NewEnum" as in VB, but I don't know, as if VBA
supports this method.

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

The code is compiled. But when I use: For each ... in .. then error 438
occurs (Object not supports this property or method)
Dim fld As clsField
For Each fld In oData.Fields
Debug.Print fld.Name
Next fld

Note: oData.Fields is correct

Can anybody help me?

Thanks
Nhan
 

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