Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Updating from 2003 to 2007: axis labels overwriting | Charts and Charting in Excel | |||
Pie chart data labels not updating | Charts and Charting in Excel | |||
Excel 2007 text labels in category axis - missing labels | Charts and Charting in Excel | |||
Updating Values and X Axis Labels | Charts and Charting in Excel | |||
Updating form labels from code in a module | Excel Programming |