Holds a collection of News server groups.
Gives the total number of group objects in a particular groups collection.
Object.Count
Long.
Read-only.
This example gives the total number of group objects present in the group Test.
’Gets the groups available on the server
Set news =CreateObject("UCX:INews.news")
’Set the IP address
news.server = "164.99.150.93"
’Establish connection with the server
news.Connect()
Set groups = news.groups
Print groups.count
Indicates whether there are any more group objects existing in the specified groups collection.
Object.HasMoreElements
Boolean.
Read-only.
This example indicates whether there are any more group objects present in a groups collection.
’Gets the groups available on the server
Set news=CreateObject("UCX:INews.news")
’Set the IP address
news.server = "164.99.150.93"
’Establish connection with the server
news.Connect()
Set groups = news.Groups
Status = Groups.Hasmoreelements
Print Status
Fetches the group objects corresponding to the specified key values.
Object.Element( Key As Variant)
Group object.
This example fetches the group objects corresponding to the key value Test and returns the name of the group.
’Gets the groups available on the server
Set news =CreateObject("UCX:INews.news")
’Set the IP address
news.Server = "164.99.150.93"
’Establish connection with the server
news.Connect()
Set groups = news.Groups()
Set group = groups.Element("Test")
Print group.Name
Returns the group objects corresponding to the specified key values.
Object.Item( Key As Variant)
Group object.
This example fetches the group object corresponding to the key value Test and returns the name of the group.
’Gets the groups available on the server
Set news =CreateObject("UCX:INews.news")
’Set the IP address
news.Server = "164.99.150.93"
’Establish connection with the server
news.Connect()
Set groups = news.Groups()
Set group = groups.Element("Test")
print group.Name
Fetches the next group object from the specified groups collection.
Object.Next()
None.
Group object.
This example sets the pointer to the next group object and returns the group name.
’Gets the groups available on the server
Set news=CreateObject("UCX:INews.news")
’Set the IP address
news.server = "164.99.150.93"
’Establish connection with the server
news.Connect()
set groups = news.groups
groups.reset()
while groups.hasmoreelements
set group =groups.next()
Print group.name
Wend
Resets the groups collection.
Object.Reset()
None.
None.
When the Next method is called after Reset method, it will fetch the first group object from the collection.
This example resets the groups collection.
’Gets the groups available on the server
Set news=CreateObject("UCX:INews.news")
’Set the IP address
news.server = "164.99.150.93"
’Establish connection with the server
news.Connect()
set groups = news.Groups
groups.Reset()
If (Err.Number = 0) Then
Print "The collection is reset"
Else
Print "Unable to reset the collection"
End if