Background 属性

返回或设置文本背景类型。本属性仅应用于图表中的文本。XlBackground 类型,可读写。

XlBackground 可为以下 XlBackground 常量之一。

xlBackgroundAutomatic

xlBackgroundOpaque

xlBackgroundTransparent

expression Background

expression   必需。该表达式返回“应用于”列表中的对象之一。

示例

本示例添加图表标题,并设置标题的字体大小和标题的背景类型。

With myChart

    .HasTitle = True

    .ChartTitle.Text = "1995 Rainfall Totals by Month"

    With .ChartTitle.Font

        .Size = 10

        .Background = xlBackgroundTransparent

    End With

End With