Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Named data range as source

Status
Not open for further replies.

wmbb

Technical User
Jul 17, 2005
320
NL
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 ?

Code:
ActiveChart.SetSourceData Source:=Sheets("sheet1").Range("A35:B338"), PlotBy _
        :=xlColumns
    ActiveChart.Location Where:=xlLocationAsObject, name:="Sheet2"
 
Have you tried this ?
Source:=Range("_datapoints")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thnx, Source:=Sheets("sheet1").Range("_datapoints") works !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top