Hello all
I would like to hide some line on a chart via VBA.
Code I already have:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub main()
Dim oshape As Shape
Dim shpGraph As Object
num_slides = ActivePresentation.Slides.Count
For x = 1 To num_slides
Set myDocument = Application.ActivePresentation.Slides(x)
myDocument.Select
num_shapes = ActiveWindow.Selection.SlideRange.Shapes.Count
For y = 1 To num_shapes
Set oshape = ActiveWindow.Selection.SlideRange.Shapes
If oshape.Type = msoEmbeddedOLEObject Then
Set shpGraph = oshape.OLEFormat.Object
MsgBox shpGraph.SeriesCollection.Count
shpGraph.Application.Update
shpGraph.Application.Quit
End If
Next
Next
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
To setup some attribute of the line i'm writing:
shpGraph.SeriesCollection
. ... (attributes value)
where n is a number of the line with data, but i dont know what to write to hide the specific line.
If someone could help.
Thanks
Kris
I would like to hide some line on a chart via VBA.
Code I already have:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub main()
Dim oshape As Shape
Dim shpGraph As Object
num_slides = ActivePresentation.Slides.Count
For x = 1 To num_slides
Set myDocument = Application.ActivePresentation.Slides(x)
myDocument.Select
num_shapes = ActiveWindow.Selection.SlideRange.Shapes.Count
For y = 1 To num_shapes
Set oshape = ActiveWindow.Selection.SlideRange.Shapes
If oshape.Type = msoEmbeddedOLEObject Then
Set shpGraph = oshape.OLEFormat.Object
MsgBox shpGraph.SeriesCollection.Count
shpGraph.Application.Update
shpGraph.Application.Quit
End If
Next
Next
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
To setup some attribute of the line i'm writing:
shpGraph.SeriesCollection
where n is a number of the line with data, but i dont know what to write to hide the specific line.
If someone could help.
Thanks
Kris