Hi,
I am trying to apply custom data labels to my chart from a series.
This is the relevant section of my code.
ActiveChart.FullSeriesCollection(2).Select
ActiveChart.SetElement (msoElementDataLabelCallout)
ActiveChart.FullSeriesCollection(2).DataLabels.Select
Application.CutCopyMode = False
ActiveChart.SeriesCollection(2).DataLabels.Format.TextFrame2.TextRange. _
InsertChartField msoChartFieldRange, "=Data!$H$2:$H$173", 0
Selection.ShowRange = True
I would like to know if its possible to change the bolded section to a series or range variable.
I've tried
Dim variablename As Series
Set variablename = Chart.SeriesCollection(3)
and I get an object mismatch error.
What kind of object can be passed into that argument?
Thanks in advance.
I am trying to apply custom data labels to my chart from a series.
This is the relevant section of my code.
ActiveChart.FullSeriesCollection(2).Select
ActiveChart.SetElement (msoElementDataLabelCallout)
ActiveChart.FullSeriesCollection(2).DataLabels.Select
Application.CutCopyMode = False
ActiveChart.SeriesCollection(2).DataLabels.Format.TextFrame2.TextRange. _
InsertChartField msoChartFieldRange, "=Data!$H$2:$H$173", 0
Selection.ShowRange = True
I would like to know if its possible to change the bolded section to a series or range variable.
I've tried
Dim variablename As Series
Set variablename = Chart.SeriesCollection(3)
and I get an object mismatch error.
What kind of object can be passed into that argument?
Thanks in advance.