ItemCountExceeded Property

Microsoft Office Visual Basic

ItemCountExceeded Property

Returns a Boolean value that indicates whether the number of items in the collection has exceeded the 99 that can be displayed in the Shared Workspace task pane. Read-only Boolean.

expression.Connected

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

Remarks

The Shared Workspace task pane can only display 99 shared workspace files and folders, links, members, or tasks. If more than 99 items are added to any of these collections:

  • the corresponding tab of the Shared Workspace task pane will stop displaying the list of items and will display a link to the shared workspace site web page instead;
  • the collection will no longer be populated locally and its Count property will return 0 (zero).
Furthermore, once the ItemCountExceeded property returns True for one of the collections listed above, the developer can no longer remedy the situation programmatically by deleting items from the collection to reduce the count below 99, because the collection is no longer populated.

The ItemCountExceeded property of the SharedWorkspaceFiles and the SharedWorkspaceFolders collections returns True when the combined Count of files and folders exceeds 99, since both lists are combined and displayed together on the Documents tab of the Shared Workspace task pane.

Example

The following example checks the Count property of the SharedWorkspaceLinks collection. If Count returns 0 (zero), it checks the ItemCountExceeded property to determine whether in fact the shared workspace has no saved links, or whether it has more than 99 and the links collection has been cleared.

        ActiveWorkbook.SharedWorkspace.Refresh
    If ActiveWorkbook.SharedWorkspace.Links.Count = 0 Then
        If ActiveWorkbook.SharedWorkspace.Links.ItemCountExceeded Then
            MsgBox "More than 99 links in shared workspace.", _
                vbInformation + vbOKOnly, "Item Count Exceeded"
        Else
            MsgBox "No links in shared workspace.", _
                vbInformation + vbOKOnly, "No Links"
        End If
    End If