I'm trying to write code to add a graph based on data I have in a spreasheet
Unfortunately the data will sometimes span across 10 cells, but sometimes will will span across 15 or 20 or however many cells (Simply, i will have more data points).
I tried writing code like this:
Sheets("Graph").Select
Columns("A:A").Select
GRange = Sheets("Graph").Range(Selection, Selection.End(xlToRight)).Select
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=GRange
But I get a "Object Variable or With block Variable Not Set" error on the 3rd line..
Any thoughts?
Bookmarks