Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Les Les is offline
external usenet poster
 
Posts: 240
Default Adding Data Label value with VBA to a chart

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a single label on excel chart Eric_G Charts and Charting in Excel 1 October 2nd 09 10:22 PM
Edit Pie Chart Data Label CMH - AL Charts and Charting in Excel 0 August 29th 08 01:22 AM
Adding a certain text label in a excel chart Tim Charts and Charting in Excel 2 September 28th 05 08:03 PM
Implementing a Label with certain data in Chart Tim Charts and Charting in Excel 3 September 13th 05 12:55 PM
Possible to add second data label to pie chart? jpwolf00 Charts and Charting in Excel 7 June 10th 05 02:34 PM


All times are GMT +1. The time now is 03:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"