Using the Process Analyst > Process Analyst for Developers > Automation Model > IPens._NewEnum [Property][Get]

IPens._NewEnum [Property][Get]

This allows For.. Each.. Next integration in VB.

Calling Syntax

This example assumes there is a valid Pens collection object to be passed into the example methods. This property is not applicable to Cicode.

[VBA]

Sub Example(Pens As Object)
Dim pen As Object
Dim count As Long
`Using Property
For Each pen In Pens
count = count + 1
Next pen
End Sub