title | keywords | f1_keywords | ms.service | ms.assetid | ms.date | ms.localizationpriority | |
---|---|---|---|---|---|---|---|
Chart.Delete method (Project) |
vbapj.chm131614 |
|
project-server |
46312c6b-db7b-7562-d97a-d1fc8ba2acb7 |
06/08/2017 |
medium |
Deletes a chart on an active report.
expression.Delete
expression A variable that represents a Chart object.
Variant
The following example displays a report, and then deletes all charts on the report.
Sub DeleteCharts()
Dim chartReport As Report
Dim chartShape As Shape
Dim reportName As String
' Display a report.
reportName = "Chart Report 1"
Set chartReport = ActiveProject.Reports(reportName)
chartReport.Apply
' Delete every chart on the report.
For Each chartShape In chartReport.Shapes
If chartShape.Type = msoChart Then
Debug.Print "Deleting chart: '" & chartShape.Name _
& "' from report: " & reportName
chartShape.Delete
End If
Next chartShape
End Sub
Chart Object Report.Delete Method
[!includeSupport and feedback]