LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Macro not updating labels? XL 2007

Hey all,

I have a macro that I wrote in XL 2003 that updates labels in a chart for me.
When I moved to XL 2007 it quit working. It doesn't give an error. The labels
just don't change?

The chart is IDX, the datasheet with labels is IDX-1

Any help would be appreciated.

Lance



Sub SetDataPoints2()
Idx = ActiveSheet.Index
Sheets(Idx - 1).Select
Application.ScreenUpdating = False

LCount = Sheets(Idx).Cells(42, 12)
For i = 1 To LCount
ActiveChart.SeriesCollection(i).ApplyDataLabels AutoText:=True, LegendKey:=False, ShowSeriesName:=False, ShowCategoryName:=False, ShowValue:=False, ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(i).Select
ActiveChart.SeriesCollection(i).Points(1).Select
ActiveChart.SeriesCollection(i).Points(1).ApplyDat aLabels AutoText:=True, LegendKey:=False, ShowSeriesName:=True, ShowCategoryName:=False, ShowValue:=False, ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(i).Points(1).DataLabe l.Characters.Text = Sheets(Idx).Cells(i + 16, 1).Value
If Sheets(Idx).Cells(i + 16, 4).Value Sheets(Idx).Cells(i + 16, 5).Value Then ActiveChart.SeriesCollection(i).Points(1).DataLabe l.Position = xlLabelPositionAbove
If Sheets(Idx).Cells(i + 16, 4).Value < Sheets(Idx).Cells(i + 16, 5).Value Then ActiveChart.SeriesCollection(i).Points(1).DataLabe l.Position = xlLabelPositionBelow

ActiveChart.SeriesCollection(i).DataLabels.Select
ActiveChart.SeriesCollection(i).Points(2).ApplyDat aLabels AutoText:=True, LegendKey:=False, ShowSeriesName:=True, ShowCategoryName:=False, ShowValue:=False, ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(i).Points(2).DataLabe l.Select
Selection.Delete

ActiveChart.SeriesCollection(i).DataLabels.Select
ActiveChart.SeriesCollection(i).Points(3).ApplyDat aLabels AutoText:=True, LegendKey:=False, ShowSeriesName:=True, ShowCategoryName:=False, ShowValue:=False, ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(i).Points(3).DataLabe l.Select
Selection.Delete

Next i

End Sub
 
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
Updating from 2003 to 2007: axis labels overwriting Jesper Kaas Charts and Charting in Excel 0 May 31st 10 05:57 AM
Pie chart data labels not updating ORLANDO VAZQUEZ[_2_] Charts and Charting in Excel 0 April 2nd 09 03:22 PM
Excel 2007 text labels in category axis - missing labels Boris Charts and Charting in Excel 3 December 5th 08 04:33 PM
Updating Values and X Axis Labels sony654 Charts and Charting in Excel 3 May 13th 07 01:06 PM
Updating form labels from code in a module news.verizon.net[_2_] Excel Programming 2 October 29th 03 04:03 AM


All times are GMT +1. The time now is 02:10 AM.

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

About Us

"It's about Microsoft Excel"