Axis.MajorUnitScale property (PowerPoint)

Returns or sets the major unit scale value for the category axis when the CategoryType property is set to xlTimeScale. Read/write XlTimeUnit.

Syntax

expression. MajorUnitScale

expression A variable that represents an 'Axis' object.

Remarks

MajorUnitScale can be one of the following xlTimeUnit constants:

  • xlMonths

  • xlDays

  • xlYears

Example

Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

The following example sets the category axis on the first chart in the active document to use a time scale and sets the major and minor units.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart.Axes(xlCategory)

            .CategoryType = xlTimeScale

            .MajorUnit = 5

            .MajorUnitScale = xlDays

            .MinorUnit = 1

            .MinorUnitScale = xlDays

        End With

    End If

End With


See also

Axis Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.