Teklynx Discover ActiveX Programmer's Manual page 18

Table of Contents

Advertisement

Chapter 1 -- 10
" " " " Collection methods
Methods for collection are described in the following table. The
Item method is required; other methods are optional.
Method name
Add
Item
Remove
The Item method takes one or more arguments to indicate the
index. Indexes can be numbers or strings.
Because Item is the default method, you could write either:
MyObject.Item(3).Name
-Or-
MyObject(3).Name
" " " " Count Property
Returns a Long (long integer) containing the number of objects
in a collection. Read-only.
Return type
VT_DISPATCH
or VT_EMPTY
Varies with
type of collec-
tion
VT_EMPTY
Programmer's Guide
Description
Adds an item to a collec-
tion. Returns VT_DISPATCH
if object is created (object
cannot exist outside the
collection) or VT_EMPTY if
no object is created (object
can exist outside the collec-
tion).
Returns the indicated item
in the collection. Required.
The Item method may
take one or more argu-
ments to indicate the ele-
ment within the collection
to return. This method is
the default member for the
collection object.
Removes an item from a
collection. Uses indexing
arguments in the same way
as the Item method.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents