I want to insert a chart by macro.
The datarange is named as _datapoints.
how can I use the datarange _datapoints as the source in stead of Source:=Sheets("sheet1").Range("A35:B338")[/color red] in the code below ?
The datarange is named as _datapoints.
how can I use the datarange _datapoints as the source in stead of Source:=Sheets("sheet1").Range("A35:B338")[/color red] in the code below ?
Code:
ActiveChart.SetSourceData Source:=Sheets("sheet1").Range("A35:B338"), PlotBy _
:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, name:="Sheet2"