Skip to main content

Borders.LineStyle property

Table of contents
  1. Syntax
  2. Example

Returns or sets the line style for the border. Read/write. The value of this property can be set to one of the XlLineStyle constants.

Syntax

expression.LineStyle

expression A variable that represents a Borders object.

Example

This example puts a border around the chart area and the plot area of Chart1.

With Charts("Chart1")
    .ChartArea.Border.LineStyle = xlDashDot
    With .PlotArea.Border
        .LineStyle = xlDashDotDot
        .Weight = xlThick
    End With
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>