This documentation is archived and is not being maintained.

Count Property

Office 2003

Returns the number of items in the specified collection. Read-only Variant.

expression.Count

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

Some collections are 0-based and some are 1-based. The Count property for collections begins with 1 even though you access the first item in a collection with a 0.

Example

The following example returns the number of themes and folders in the active Web site.

Private Sub GetWebCount()
    Dim myWeb As WebEx
    Dim myCount As Integer

    Set myWeb = ActiveWeb

    With myWeb
            myThemeCount = .Themes.Count
            myFolderCount = .RootFolder.Folders.Count
    End With
End Sub




Show: