トップページ(目次)

555.ピボットグラフの色を指定する_変更する

<実行前後>
 → 
Sub ピボットグラフの色を指定する_変更する()
    
    'まずグラフをアクティブにする「グラフ 1」=グラフ名
    ActiveSheet.ChartObjects("グラフ 1").Activate
    
    '1つ目の要素に色を塗る
    ActiveChart.FullSeriesCollection(1).Points(1).Format.Fill.ForeColor.RGB = RGB(255, 0, 0) '赤
    
    '2つ目の要素に色を塗る
    ActiveChart.FullSeriesCollection(1).Points(2).Format.Fill.ForeColor.RGB = RGB(0, 255, 0) '緑
    
    '3つ目の要素に色を塗る
    ActiveChart.FullSeriesCollection(1).Points(3).Format.Fill.ForeColor.RGB = RGB(0, 0, 255) '青
    
End Sub

Copyright © 2021 https://excel3000.web.fc2.com/ All Rights Reserved.
    inserted by FC2 system