ExcelChartを使用し、グラフを作成しています。
グラフは下記の操作ができず、完成に至っておりません。
ご存知の方、教えて頂けないでしょうか。
VBA(マクロ)でのコードです。
//2軸目を選択し、折れ線に変更
ActiveChart.SeriesCollection(2).Select
ActiveChart.SeriesCollection(2).ChartType = xlLine
//グラフ2軸目を選択し、Y第2軸に設定
ActiveChart.SeriesCollection(2).Select
ActiveChart.SeriesCollection(2).AxisGroup = 2
//Y軸ラベル設定
//HasTitleは設定できています。
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "hoge1"
.Axes(xlValue, xlSecondary).HasTitle = True
.Axes(xlValue, xlSecondary).AxisTitle.Characters.Text = "hoge2"
以上、よろしくお願いします。
補足・訂正します。
//HasTitleは設定できています。
.Axes(xlValue, xlPrimary).HasTitle = True
と書きましたが、私の勘違いです。
あと環境ですが、Del7Pro Win2K Office2Kを使用しております。
ツイート | ![]() |