Hi,
I am trying to edit some macro code written by a co-worker involving excel graph objects. The macro scans the data and creates a chart. I have inserted the following line to rename the chart so that I can access it later.
ActiveChart.Name = assays(i) & controlRange
After updating the chart, it is moved to a seperate sheet as an object. When it is moved, the chart name is changed to "Summary for Export Chart 2217" and I am unable to edit the name. The code that moves the chart and updates the chart properties is given below.
ActiveChart.Location Where:=xlLocationAsObject, Name:="Summary for Export"
With ActiveChart
.HasTitle = True
.chartTitle.Characters.Text = chartTitle & "" & addString
'.Name = addString
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Date"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Titer"
.Axes(xlCategory).Select
Selection.TickLabels.NumberFormat = "[$-409]d-mmm-yy;@"
Selection.TickLabels.Font.Size = 7
End With
The macro creates 18 charts and I would like the access them by name if possible. Any help on manipulating chart objects in a sheet would be great.
Thanks,
mep
I am trying to edit some macro code written by a co-worker involving excel graph objects. The macro scans the data and creates a chart. I have inserted the following line to rename the chart so that I can access it later.
ActiveChart.Name = assays(i) & controlRange
After updating the chart, it is moved to a seperate sheet as an object. When it is moved, the chart name is changed to "Summary for Export Chart 2217" and I am unable to edit the name. The code that moves the chart and updates the chart properties is given below.
ActiveChart.Location Where:=xlLocationAsObject, Name:="Summary for Export"
With ActiveChart
.HasTitle = True
.chartTitle.Characters.Text = chartTitle & "" & addString
'.Name = addString
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Date"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Titer"
.Axes(xlCategory).Select
Selection.TickLabels.NumberFormat = "[$-409]d-mmm-yy;@"
Selection.TickLabels.Font.Size = 7
End With
The macro creates 18 charts and I would like the access them by name if possible. Any help on manipulating chart objects in a sheet would be great.
Thanks,
mep