Example

Use the property of the object to return a SharedWorkspaceFiles collection.

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

See also: