So I'm attempting to create a graph chart using a name as a range of data. I generated a code using Excel, and I got the following:
Sub Macro_name_graph2()
'
' Macro_name_graph2 Macro
'
'
ActiveChart.SeriesCollection.NewSeries
ActiveChart.FullSeriesCollection(1).name = "=""data1_1"""
ActiveChart.FullSeriesCollection(1).Values = "==test_macro.xlsm!data1_1ord"
ActiveChart.FullSeriesCollection(1).XValues = "==test_macro.xlsm!data1_1abs"
End Sub
what I put in the actual chart was ='test_macro.xlsm'!data1_1ord and ='test_macro.xlsm'!data1_1abs
But not when I try to run it again, I have an error 1004 at
ActiveChart.FullSeriesCollection(1).Values = "==test_macro.xlsm!data1_1ord"
So I tried to put
ActiveChart.FullSeriesCollection(1).Values = "=='test_macro.xlsm'!data1_1ord"
And it didn't work. Can someone please help me with this?