Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.08 KB

Project.Application.ActiveSelection.md

File metadata and controls

49 lines (33 loc) · 1.08 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.ActiveSelection property (Project)
vbapj.chm131378
vbapj.chm131378
project-server
Project.Application.ActiveSelection
aa72b337-4031-a970-0921-d1d60f66096e
06/08/2017
medium

Application.ActiveSelection property (Project)

Gets a Selection object that represents the active selection. Read-only Selection.

Syntax

expression. ActiveSelection

expression A variable that represents an Application object.

Example

The following example displays the name of each selected task in a message box. Running this example without a valid selection results in a trappable error (error code 424).

Sub SelectedTasks() 
 
 Dim T As Task 
 
 If Not (ActiveSelection.Tasks Is Nothing) Then 
 For Each T In ActiveSelection.Tasks 
 ' Test for blank task row 
 If Not (T Is Nothing) Then 
 MsgBox T.Name 
 End If 
 Next T 
 End If 
 
End Sub

[!includeSupport and feedback]