設定資料標記的背景色彩的 RGB 值或傳回相對應的色彩索引值。 背景顏色在應用程序中顯示為填充顏色。 僅適用於折線圖、散佈圖和雷達圖。 可讀寫的 Long。
語法
表達。標記背景顏色
詞 代表 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 支援與意見反應。