Example

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

Visual Basic for Applications
 Dim swsTasks As Office.SharedWorkspaceTasks Set swsTasks = ActiveWorkbook.SharedWorkspace.Tasks MsgBox "There are " & swsTasks.Count & _ " task(s) in the current shared workspace.", _ vbInformation + vbOKOnly, _ "Collection Information" Set swsTasks = Nothing 

See also: