Name
plotarea
.Fill
Synopsis
Returns the ChartFillFormat
object used to control the background of the plot area. The following code applies a built-in fill to the plot area:
Sub ApplyPlotAreaFill( ) Dim chrt As Chart, pa As PlotArea ' Get the chart. Set chrt = ActiveChart ' Make it a line chart chrt.ChartType = xlLine ' Get the plot area. Set pa = chrt.PlotArea ' Set a fill texture. pa.Fill.Visible = True pa.Fill.PresetTextured msoTextureCanvas End Sub
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.