srizki
Well-known Member
- Joined
- Jan 14, 2003
- Messages
- 1,860
- Office Version
- 365
- Platform
- Windows
I have this,
Sub Chart()
'
' Chart Macro
' Macro recorded 6/30/2011 by rizki00s
'
'
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.PlotArea.Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Interior.ColorIndex = xlNone
ActiveWindow.Visible = False
Windows("Wind Service USA Tech Productivity Reportl.xls").Activate
Range("A4").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields("Project").Orientation = _
xlHidden
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.SeriesCollection(1).Select
ActiveChart.ChartType = xlPie
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).ApplyDataLabels AutoText:=True, LegendKey:= _
False, HasLeaderLines:=True, ShowSeriesName:=False, ShowCategoryName:= _
True, ShowValue:=True, ShowPercentage:=True, ShowBubbleSize:=False
ActiveChart.ChartArea.Select
End Sub
this labels the charts, but every time I make some changes and save, I loose the lables, and I have to go through each chart one by one and run this macro.
Can I activate all sheet and run this macro all at once ?
It is not working that way I know I will have to do some little changes but do not know what.
Thanks
Sub Chart()
'
' Chart Macro
' Macro recorded 6/30/2011 by rizki00s
'
'
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.PlotArea.Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
Selection.Interior.ColorIndex = xlNone
ActiveWindow.Visible = False
Windows("Wind Service USA Tech Productivity Reportl.xls").Activate
Range("A4").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields("Project").Orientation = _
xlHidden
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.SeriesCollection(1).Select
ActiveChart.ChartType = xlPie
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).ApplyDataLabels AutoText:=True, LegendKey:= _
False, HasLeaderLines:=True, ShowSeriesName:=False, ShowCategoryName:= _
True, ShowValue:=True, ShowPercentage:=True, ShowBubbleSize:=False
ActiveChart.ChartArea.Select
End Sub
this labels the charts, but every time I make some changes and save, I loose the lables, and I have to go through each chart one by one and run this macro.
Can I activate all sheet and run this macro all at once ?
It is not working that way I know I will have to do some little changes but do not know what.
Thanks