Hello guys,
im creating visual representation of my data, and i want to create charts.
The code to create the chart is:
Range("T1:T32,V1:V32,X1:X32").Select
ActiveSheet.Shapes.AddChart2(201, xlColumnClustered).Select
ActiveChart.SetSourceData Source:=Range( _
"'test'!$T$1:$T$32,'test'!$V$1:$V$32,'test'!$X$1:$X$32" _
)
ActiveChart.FullSeriesCollection(1).ChartType = xlColumnClustered
ActiveChart.FullSeriesCollection(1).AxisGroup = 1
ActiveChart.FullSeriesCollection(2).ChartType = xlLine
ActiveChart.FullSeriesCollection(2).AxisGroup = 1
I want to create graphs for each month of data, so i will need position them properly, to achieve that i need to name each of my charts.
(since they will all be the same size, i plan to set their positions into 12 static positions for each month, is there a better idea?)
i can see the chart name with:
ActiveChart.Name, but the name is based on the tab name + incremental number "chart"
If i try to update it with a value:
ActiveChart.Name = "test"
I get the error: Out of memory
Never had this issue before, what am i doing wrong?
Also, is there any way to control the incremental number? If i could reset it every time my macro is run i could use it, but right now it keeps incrementing every time a chart is made and to reset the number i have to remake the tab
im creating visual representation of my data, and i want to create charts.
The code to create the chart is:
Range("T1:T32,V1:V32,X1:X32").Select
ActiveSheet.Shapes.AddChart2(201, xlColumnClustered).Select
ActiveChart.SetSourceData Source:=Range( _
"'test'!$T$1:$T$32,'test'!$V$1:$V$32,'test'!$X$1:$X$32" _
)
ActiveChart.FullSeriesCollection(1).ChartType = xlColumnClustered
ActiveChart.FullSeriesCollection(1).AxisGroup = 1
ActiveChart.FullSeriesCollection(2).ChartType = xlLine
ActiveChart.FullSeriesCollection(2).AxisGroup = 1
I want to create graphs for each month of data, so i will need position them properly, to achieve that i need to name each of my charts.
(since they will all be the same size, i plan to set their positions into 12 static positions for each month, is there a better idea?)
i can see the chart name with:
ActiveChart.Name, but the name is based on the tab name + incremental number "chart"
If i try to update it with a value:
ActiveChart.Name = "test"
I get the error: Out of memory
Never had this issue before, what am i doing wrong?
Also, is there any way to control the incremental number? If i could reset it every time my macro is run i could use it, but right now it keeps incrementing every time a chart is made and to reset the number i have to remake the tab