balumail75
11-03-2011, 10:30 PM
Hello all,
I am writing vba code for removing data labels for the charts type 100% stacked bar in ppt 2007. Below is the code, I have created. This gives the error message "This member can only be accessed for a chart object". Please help in this code.
Dim sld As Slide
Dim shp As Shape
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasChart And shp.Chart.ChartType = 59 Then
shp.Chart.ApplyDataLabels xlDataLabelsShowNone
End If
Next shp
Next sld
I am writing vba code for removing data labels for the charts type 100% stacked bar in ppt 2007. Below is the code, I have created. This gives the error message "This member can only be accessed for a chart object". Please help in this code.
Dim sld As Slide
Dim shp As Shape
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasChart And shp.Chart.ChartType = 59 Then
shp.Chart.ApplyDataLabels xlDataLabelsShowNone
End If
Next shp
Next sld