VBAでグラフを作成し、.Name = Range("B26") と記載しているのですが、
項目名が表示されず困っております。
どなたかご教示お願いします。
With ActiveSheet.ChartObjects(numGraph).Chart 'グラフ種類 == 折れ線グラフに設定 .ChartType = xlLine 'タイトルを表示 .HasTitle = True 'タイトル位置指定 .ChartTitle.Text = sh.Cells(1, i) '凡例の表示有無 有 .HasLegend = True '凡例の表示位置 ==上 .Legend.Position = xlTop End With With ActiveSheet.ChartObjects(numGraph).Chart.Axes(xlCategory, 1) .HasTitle = True '軸ラベルを表示 End With '「X軸のデータ」と「1つ目の系列」を追加 With ActiveSheet.ChartObjects(numGraph).Chart.SeriesCollection.NewSeries 'X軸のデータ .XValues = sh.Range(sh.Cells(First_Row, 4), sh.Cells(First_Row + (23 * Date_weight), 4)) 'データ範囲 .Values = sh.Range((sh.Cells(2, i).Address), sh.Cells(25, i).Address) . Name = Range("B2") '系列名 End With '「2つ目の系列」を追加 With ActiveSheet.ChartObjects(numGraph).Chart.SeriesCollection.NewSeries .Name = Range("B26") '系列名 .Values = sh.Range((sh.Cells(26, i).Address), sh.Cells(49, i).Address) 'データ範囲 End With '「3つ目の系列」を追加 With ActiveSheet.ChartObjects(numGraph).Chart.SeriesCollection.NewSeries .Name = Range("B50") '系列名 .Values = sh.Range((sh.Cells(50, i).Address), sh.Cells(73, i).Address) 'データ範囲 End With 'グラフサイズ設定 With ActiveSheet.ChartObjects .Height = 500 .Width = 1400 End With コードここに言語を入力 ```

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。