ChartBorder.LineStyle property (PowerPoint)

Returns or sets the line style for the border. Read/write XlLineStyle, xlGray25, xlGray50, xlGray75, or xlAutomatic.

Syntax

expression.LineStyle

expression A variable that represents a 'ChartBorder' object.

Remarks

The xlDouble and xlSlantDashDot constants of the xlLineStyle enumeration don't apply to charts.

Example

Note

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

The following example puts a border around the chart area and the plot area of the first chart in the active document.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        With .Chart

            .ChartArea.Border.LineStyle = xlDashDot

            With .PlotArea.Border

                .LineStyle = xlDashDotDot

                .Weight = xlThick

            End With

        End With

    End If

End With


See also

ChartBorder 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.