Class PlotArea (Excel VBA)
The class PlotArea represents the plot area of a chart.
The main procedure of class PlotArea is Select
Methods
This is the main method of the PlotArea class
Select - Selects the object.
Properties
Format returns the ChartFormat object.
Height returns or sets a Double value that represents the height, in points, of the object.
InsideHeight returns the inside height of the plot area, in points.
With Charts("chart1")
Set pa = .PlotArea
With .Shapes.AddShape(msoShapeRectangle, _
pa.InsideLeft, pa.InsideTop, _
pa.InsideWidth, pa.InsideHeight)
.Fill.Transparency = 1
.Line.DashStyle = msoLineDashDot
End With
End With
InsideLeft returns the distance from the chart edge to the inside left edge of the plot area, in points.
With Charts("chart1")
Set pa = .PlotArea
With .Shapes.AddShape(msoShapeRectangle, _
pa.InsideLeft, pa.InsideTop, _
pa.InsideWidth, pa.InsideHeight)
.Fill.Transparency = 1
.Line.DashStyle = msoLineDashDot
End With
End With
InsideTop returns the distance from the chart edge to the inside top edge of the plot area, in points.
With Charts("chart1")
Set pa = .PlotArea
With .Shapes.AddShape(msoShapeRectangle, _
pa.InsideLeft, pa.InsideTop, _
pa.InsideWidth, pa.InsideHeight)
.Fill.Transparency = 1
.Line.DashStyle = msoLineDashDot
End With
End With
InsideWidth returns the inside width of the plot area, in points.
With Charts("chart1")
Set pa = .PlotArea
With .Shapes.AddShape(msoShapeRectangle, _
pa.InsideLeft, pa.InsideTop, _
pa.InsideWidth, pa.InsideHeight)
.Fill.Transparency = 1
.Line.DashStyle = msoLineDashDot
End With
End With
Left returns or sets a Double value that represents the distance, in points, from the left edge of the object to the left edge of column A (on a worksheet) or the left edge of the chart area (on a chart).
Name returns a String value that represents the name of the object.
Parent returns the parent object for the specified object. Read-only.
Position returns or sets the position of the plot area on the chart.
Top returns or sets a Double value that represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart).
Width returns or sets a Double value that represents the width, in points, of the object.