The EOF property specifies whether all the elements have been fetched while iterating through the associated collection.
collection.EOF
Part | Description |
---|---|
collection | Expression that evaluates to a collection in the Applies To list |
Boolean
Read-only
HRESULT GetEOF(VARIANT_BOOL *pRetVal);
Iterate through a collection by checking the EOF property after calling the Next method. If EOF is TRUE, Next will have returned Nothing and all of the elements will have been fetched. The following Microsoft® Visual Basic® code shows this process:
Set object = collection.Next
Do Until collection.EOF
. . .
Set object = collection.Next
Loop
The collections in the Applies To list also can be processed using For Each ... Next in Visual Basic:
For Each object In collection
. . .
Next object