Item PropertyItem Property*
*Contents  *Index  *Topic Contents
*Previous Topic: Count Property
*Next Topic: Methods

Item Property

Accesses a channel in the collection. This is the default property of the Channels collection.

Syntax

value=object.Item[(Index)]

Parameters

valueRequired. An object expression that evaluates to a Channel object.
objectRequired. An object expression that evaluates to a Channels collection object.
IndexOptional. A variant. The channel index is 1-based. If no Index parameter is specified or if it is an empty variant, the channel with the highest index is returned by the Item property.

The Index parameter can also be a string that represents the unique channel key specified at creation time in the Add method.

Remarks

Access is read-only.

Because Item is the default property of the Channels collection, the keyword "Item" can be omitted.

Examples

MsChatPr1.Channels.Add 1, "One"
MsChatPr1.Channels.Add 2, "Two"
MsChatPr1.Channels.Add 3, "Three"
MsChatPr1.Channels.Add 4, "Four"
Dim c As Channel
Set c = MsChatPr1.Channels.Items(4)
    'is equivalent to
Set c = MsChatPr1.Channels(4)
    'is equivalent to
Set c = MsChatPr1.Channels("Four")
    'is equivalent to
Set c = MsChatPr1.Channels.Item
Dim coll As Channels
Dim chan1, chan2 As Channel
Set coll = MsChatPr1.Channels
Set chan1 = coll.Add(1, "Foo")
Set chan2 = coll.Item(1)

See Also

Add


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.