Class ChartTitle (PowerPoint VBA)

The class ChartTitle represents the chart title.

The main procedures of class ChartTitle are Delete and Select

Set

To use a ChartTitle class variable it first needs to be instantiated, for example

Dim cte as ChartTitle
Set cte = ActiveWindow.RangeFromPoint.Chart.ChartTitle

ChartTitle class variables can be set using the Chart.ChartTitle procedure.

Themes

Some procedures in this class have been grouped together in themes and are described on separate theme pages

Name with its procedures Caption and Name
Format with its procedures Format, Height, IncludeInLayout and Width
Formula with its procedures Formula, FormulaLocal, FormulaR1C1 and FormulaR1C1Local

Methods

These are the main methods of the ChartTitle class

Delete - Deletes the object.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.Delete

Select - Selects the object.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.Select

Other Methods

SetProperty -

Dim strId As String: strId = 
ActiveWindow.RangeFromPoint.Chart.ChartTitle.SetProperty Id:=strId, Value:=

Properties

Characters returns a ChartCharacters object that represents a range of characters within the object text. You can use the ChartCharacters object to format characters within a text string.

Dim ccsCharacters As ChartCharacters
Set ccsCharacters = ActiveWindow.RangeFromPoint.Chart.ChartTitle.Characters

HorizontalAlignment returns or sets the horizontal alignment for the specified object.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.HorizontalAlignment = xl3DBar

Left returns or sets the distance, in points, from the left edge of the object to the left edge of the chart area.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.Left =

Orientation returns or sets the text orientation. Read/write Long.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.Orientation =

Parent returns the parent for the specified object. Read-only object.

Dim objParent As Object
Set objParent = ActiveWindow.RangeFromPoint.Chart.ChartTitle.Parent

Position returns or sets the position of the chart title on the chart.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.Position = xlChartElementPositionAutomatic

ReadingOrder returns or sets an XlReadingOrder constant that represents the reading order for the specified object.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.ReadingOrder =

Shadow returns or sets a value that indicates whether the object has a shadow.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.Shadow = True

Text returns or sets the text for the specified object.

ActivePresentation.Slides(1).Shapes(1).Chart.ChartTitle.Text =

Top returns or sets the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart).

ActiveWindow.RangeFromPoint.Chart.ChartTitle.Top =

VerticalAlignment returns or sets the vertical alignment of the specified object.

ActiveWindow.RangeFromPoint.Chart.ChartTitle.VerticalAlignment = xl3DBar