0
我有兩個命名範圍,詳情如下:如何將兩個命名範圍設置爲圖表數據源?
Set JRange = sht.Range(sht.Cells(StartRow, 10), sht.Cells(LastRow, 10))
Set DRange = sht.Range(sht.Cells(StartRow, 4), sht.Cells(LastRow, 4))
我想使用這兩者作爲來源爲我指定的圖表宏。這是我的:
Set Chart = ActiveSheet.ChartObjects.Add(Left:=300, Width:=325.9842519685, Top:=10, Height:=277.5118110236)
With Chart
.Chart.SetSourceData Source:=Range(DRange) And (JRange), PlotBy:=xlColumns
.Chart.ChartType = xlLine
.Chart.ChartStyle = 2
.Height = 277.5118110236
.Width = 325.9842519685
任何幫助將不勝感激!