Hi all, i have an error setting a range for my graph. Currently my code looks like this. Any solutions? Thanks in advance
Dim r As Range
set r = Range(Selection, Selection.End(xlToRight).Offset(0, -1))
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range(r), PlotBy _
:=xlRows
ActiveChart.SeriesCollection(1).XValues = "=Sheet1!R12C4:R12C15"
ActiveChart.SeriesCollection(1).Name = "=Sheet1!R14C3"
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
ActiveChart.HasLegend = False
ActiveChart.HasDataTable = False
Bookmarks