This is in PowerPoint 2010.
Good afternoon, I'm trying to see if I can amend the following code that I've inherited
so it will only run if there is something in
Trouble is I can't figure out the syntax to do it!! I appear to be able to do this one level up with
I just think it might be a bit tidier. It's no biggy if it can't be done; HOWEVER a BIG issue is that this data label appears to remove & replace the chg.SeriesCollection(i).DataLabels.ShowSeriesName that gets set in the code prior to this point.
Any help would be gratefully received.
Many thanks,
D€$
Good afternoon, I'm trying to see if I can amend the following code that I've inherited
Code:
Set sh = ActiveWindow.Selection.ShapeRange(1)
If sh.Type = msoEmbeddedOLEObject Then
Set gr = sh.OLEFormat.Object
Set chg = gr.Application.Chart
For i = 1 To 29
....
..........
For j = 1 To 29
On Error Resume Next 'e.g. when there's nothing there
With chg.SeriesCollection(i).Points(j)
.HasDataLabel = True
.DataLabel.ShowValue = False
.DataLabel.ShowSeriesName = True
.DataLabel.Position = xlLabelPositionLeft
End With
On Error GoTo 0 'Reset error handling
Next j
Code:
.DataLabel.ShowValue
Code:
If chg.SeriesCollection(i).HasDataLabels Then
I just think it might be a bit tidier. It's no biggy if it can't be done; HOWEVER a BIG issue is that this data label appears to remove & replace the chg.SeriesCollection(i).DataLabels.ShowSeriesName that gets set in the code prior to this point.
Any help would be gratefully received.
Many thanks,
D€$