Skip to content

Latest commit

 

History

History
63 lines (39 loc) · 1.39 KB

Project.chart.select.md

File metadata and controls

63 lines (39 loc) · 1.39 KB
title keywords f1_keywords ms.service ms.assetid ms.date ms.localizationpriority
Chart.Select method (Project)
vbapj.chm131638
vbapj.chm131638
project-server
dd4e1adf-3098-61a3-5913-8debc7d01351
06/08/2017
medium

Chart.Select method (Project)

Selects one or more charts in a report.

Syntax

expression.Select (Replace)

expression A variable that represents a Chart object.

Parameters

Name Required/Optional Data type Description
Replace Optional Variant True to replace the current selection with the specified chart. False to extend the current selection to include any previously selected charts.
Replace Optional Variant

Return value

Variant

Example

Create a report that contains at least two charts. The following example selects both charts in the report.

Sub SelectBothCharts()
    Dim chartShape1 As Shape
    Dim chartShape2 As Shape
    Dim reportName As String
    
    reportName = "Simple scalar chart"
    Set chartShape1 = ActiveProject.Reports(reportName).Shapes(1)
    Set chartShape2 = ActiveProject.Reports(reportName).Shapes(2)
    
    chartShape1.Chart.Select Replace:=True
    chartShape2.Chart.Select Replace:=False
End Sub

See also

Chart Object

[!includeSupport and feedback]