应用于 CanvasShapes 对象的 Background 属性。
返回一个 Shape 对象,该对象代表指定文档的背景图像。只读。
expression Background
expression 必需。该表达式返回一个 CanvasShapes 对象。
返回或设置文本背景类型。本属性用于图表中的文本。Variant 类型,可读写。
expression Background
expression 必需。该表达式返回一个 Font 对象。
以下常量可与应用于 Font 对象的 Background 属性一起使用:xlBackgroundAutomatic、xlBackgroundOpaque 和 xlBackgroundTransparent。
本示例为第一张工作表上的第一张嵌入图表添加图表标题,然后设置标题的字体大小和背景类型。本示例假定图表在第一张工作表上。
Sub UseBackground()
With Worksheets(1).ChartObjects(1).Chart
.HasTitle = True
.ChartTitle.Text = "Rainfall Totals by Month"
With .ChartTitle.Font
.Size = 10
.Background = xlBackgroundTransparent
End With
End With
End Sub