View Single Post
  #13  
Old April 16th, 2004, 04:47 PM
Andy Pope
external usenet poster
 
Posts: n/a
Default Line chart, value labeling

You did run the macro again once the data changed.
Also note the additional code line to clear any previous labels.

Sub LastPointLabel()
Dim mySrs As Series
Dim nPts As Long
For Each mySrs In ActiveChart.SeriesCollection
With mySrs
.HasDataLabels = False ' Remove previous labels
nPts = .Points.Count
mySrs.Points(nPts).ApplyDataLabels _
Type:=xlDataLabelsShowValue, _
AutoText:=True, LegendKey:=False
mySrs.Points(nPts).DataLabel.Text = mySrs.Values ' **
End With
Next
End Sub


NYBoy wrote:

Andy, It worked. It gave me the value of the last point (for month
April) but.....

Just to test...As I entered the new data in the spreadsheet for next
month, those values didn't role to the next point.
I was expecting that it would give me new values for the new last
point...
Sorry to bother you again..


---
Message posted from http://www.ExcelForum.com/


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info