Adding Data Label value with VBA to a chart
when a chart first gets created it is on its own sheet. If you put it on a
worksheet the chart changes names but is still active. See code below.
Set NewChart = Charts.Add
NewChart.ChartType = xlXYScatter
NewChart.SetSourceData _
Source:=Sheets("Sheet1").Range("H12:I13"), _
PlotBy:=xlRows
NewChart.Location _
Whe=xlLocationAsObject, Name:="Sheet1"
Set NewChart = ActiveChart
NewChart.SeriesCollection(1).ApplyDataLabels _
AutoText:=True, _
LegendKey:=False, _
ShowSeriesName:=False, _
ShowCategoryName:=True, _
ShowValue:=True, _
ShowPercentage:=False, _
ShowBubbleSize:=False
"Les" wrote:
Hi all, i recorded a macro to make a basic bar chart and selected it to show
the data label value, but it does not show it when i run the macro.
Any assistance will be appreciated.
--
Les
|