Microsoft Chat Server SDK Reference

Item Property

This property returns a single ChatChannel object from the collection.

Syntax

Set Channel = ChatChannels.Item(Index|Key)

Parameters

Channel
A ChatChannel object, or Nothing if Index is out of range or if Key cannot be found.
Index
A numeric index into the array of objects. The first item is stored at index 1.
Key
A text string key representing the channel's Name property.

Remarks

You can use either an Index or Key value, but not both. Since Item is the default property, it does not need to be specified. For example, the following code is syntactically correct:

Dim Channel1 As CHATSVCLib.IChatChannel
Set Channel1 = ChatServer.Channels("#Channel1")

You can use a For Each…Next loop to iterate through all objects in the collection. The following Visual Basic example shows how this is done:

Dim Channel As CHATSVCLib.IChatChannel
For Each Channel In ChatServer.Channels
   Debug.Print Channel.Name
Next

© 1998 Microsoft Corporation. All rights reserved.