Does anyone out there know how to correctly use the hidden NewEnum for enumerating collection objects???


I used this in my collection class with the advanced hidden property set to -4

Public Function NewEnum()
'allow for the For Each...Next enumeration
Set NewEnum = mCustomers.[_NewEnum]
End Function

Then in my form i try to use the For Each...Next with

Private Sub cmdDisplayAll_Click()
'display mailing labels for all customers

Dim Label As CCustomer

For Each Label In mCustomers
With Label
frmDisplayAll.picAllLabels.Print .AcctNumber
frmDisplayAll.picAllLabels.Print .LastName
frmDisplayAll.picAllLabels.Print .FirstName
frmDisplayAll.picAllLabels.Print .City
frmDisplayAll.picAllLabels.Print .State
frmDisplayAll.picAllLabels.Print .Zip
frmDisplayAll.picAllLabels.Print ""
End With
Next
End Sub

I keep getting a "object required" at the For Each statement

I'm sure i'm just forgetting something but i'm not sure what.

Thanks for reading!