共用方式為


Point.MarkerForegroundColorIndex 屬性 (Excel)

會傳回或設定資料標記的前景色彩為目前調色盤中、 索引或下列 其中一個 XlColorIndex 常數之一: xlColorIndexAutomaticxlcolorindexnone: 一起 。 僅適用於折線圖、散佈圖和雷達圖。 可讀寫的 Long

語法

運算式MarkerForegroundColorIndex

表達 代表 Point 物件的變數。

範例

本範例會設定 Chart1 上第一個數列中第二個點的標記背景和前景色彩。

With Charts("Chart1").SeriesCollection(1).Points(2) 
 .MarkerBackgroundColorIndex = 4 'green 
 .MarkerForegroundColorIndex = 3 'red 
End With

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應