I have a chart and I would like to add another data series on a secondary axis. It seems like it should be simple, but I can’t get it to dynamically add the current sheet name to the data series. I looked all over the web and landed on this, but it still won’t run. How can I fix this?
Sub PyGraph()
'
' PyGraph Macro
'
'
With ActiveChart
.SeriesCollection.NewSeries
.FullSeriesCollection(2).Name = "=""CL"""
.FullSeriesCollection(2).Values = "=" & ActiveSheet & "!$F$2:$F$256"
.FullSeriesCollection(2).XValues = "=" & ActiveSheet & "!$H$2:$H$256"
.FullSeriesCollection(2).AxisGroup = 2
End With
End Sub