Skip to main content

ChartObject.Chart property

Table of contents
  1. Syntax
  2. Example

Returns a Chart object that represents the chart contained in the object. Read-only.

Syntax

expression.Chart

expression A variable that represents a ChartObject object.

Example

This example adds a title to the first embedded chart on Sheet1.

With Worksheets("Sheet1").ChartObjects(1).Chart
    .HasTitle = True
    .ChartTitle.Text = "1995 Rainfall Totals by Month"
End With

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>