Syntax

expression.Count

expression A variable that represents a SharedWorkspaceFiles object.

Return Value
Integer

Example

The following example displays a message box with a count of the number of shared workspace files in the SharedWorkspaceFiles collection.

Visual Basic for Applications
Sub Main() Dim swsFiles As Office.SharedWorkspaceFiles Set swsFiles = ActiveWorkbook.SharedWorkspace.Files MsgBox "There are " & swsFiles.Count & _ " file(s) vbInformation + vbOKOnly, _ "Collection Information" Set swsFiles = Nothing End Sub