Hello
Excel 2013 offers adding data label from cell value. i want to add data label for series collections, but the below code failed!!
please help.
Excel 2013 offers adding data label from cell value. i want to add data label for series collections, but the below code failed!!
please help.
Code:
With .SeriesCollection.NewSeries
.Name = "=" & COM.Name & "!R10C3"
.Values = "=" & COM.Name & "!R" & 11 & "C2:R" & COM.Cells(1, 1).Value & "C2"
.XValues = "=" & COM.Name & "!R" & 11 & "C1:R" & COM.Cells(1, 1).Value & "C1"
.Border.Color = RGB(0, 102, 204)
.Format.Line.Weight = 0.1
With .FullSeriesCollection
.ApplyDataLabels
.ShowRange = True
.showvalues = False
.DataLabels.Format.TextFrame2.TextRange.InsertChartField msoChartFieldRange, _
"=" & COM.Name & "!R" & 11 & "C" & (Currcol + 1) & ":R" & COM.Cells(1, 1) & "C" & (Currcol + 1), 0
End With