title | keywords | f1_keywords | ms.service | ms.assetid | ms.date | ms.localizationpriority | |
---|---|---|---|---|---|---|---|
Chart.Select method (Project) |
vbapj.chm131638 |
|
project-server |
dd4e1adf-3098-61a3-5913-8debc7d01351 |
06/08/2017 |
medium |
Selects one or more charts in a report.
expression.Select (Replace)
expression A variable that represents a Chart object.
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 |
Variant
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
[!includeSupport and feedback]