設定資料標記的背景色彩的 RGB 值或傳回相對應的色彩索引值。 背景色彩在應用程式中顯示為填滿色彩。 僅適用於折線圖、散佈圖和雷達圖。 可讀寫的 Long。
語法
運算式。MarkerBackgroundColor
運算式 代表 Point 物件的變數。
範例
此範例會為 Chart1 上數列 1 的第一個點設定標記背景 (填滿) 和前景 (框線) 色彩。
With Charts("Chart1").SeriesCollection(1).Points(1)
.MarkerBackgroundColor = RGB(0,255,0) ' green fill
.MarkerForegroundColor = RGB(255,0,0) ' red border
End With
此範例將 Chart1 上數列 1 中的第二個點的標記色彩設定為自動。
With Charts("Chart1").SeriesCollection(1).Points(2)
.MarkerBackgroundColor = -1 ' automatic fill
.MarkerForegroundColor = -1 ' automatic border
End With
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。