Results 1 to 2 of 2

Thread: [PowerPoint] manipulate animation order of two XYScatterLine-Charts by VBA

  1. #1
    New Member
    Join Date
    Sep 12
    Posts
    2

    [PowerPoint] manipulate animation order of two XYScatterLine-Charts by VBA

    Hi,

    I've got two XYScatterLine-Charts from Excel2010 on one PP2010 slide and I have the animated (msoAnimEffectAppear) the charts by category: If I run the presentation, all the points from chart1 appear one after the other and then, afterwards, the same happens with chart2. So far so good.

    BUT, I want both charts to appear synchronously, i.e. point1/chart1 together with point1/chart2, then after 0.1 sec point2/chart1 together with point2/chart2 and so forth until the last points (appr. 200).

    I could do that by hand in the animation window, but this would take about two hours of very dull drag and drop. Therefore I tried a bit with things like:
    Code:
    ActivePresentation.Slides(1).TimeLine.MainSequence(1).MoveTo
    but I got stuck. I'd very much appreciate any suggestions!

    Rumpel

    P.S.: It's pity that there's no macro recorder in PP.

  2. #2
    New Member
    Join Date
    Sep 12
    Posts
    2

    Resolved [RESOLVED: [PowerPoint] manipulate animation order of two XYScatterLine-Charts by VBA

    Hi, I tried again and found a solution myself:
    Code:
    Sub entangle_animation_two_diagrams()
    
        Dim MainSeqCount, Counter, FirstPointSecDia, TargetPosition
        
        FirstPointSecDia = 197 ' First Point of the second diagram
        TargetPosition = 2
        
        MainSeqCount = ActivePresentation.Slides(1).TimeLine.MainSequence.Count
        For Counter = FirstPointSecDia To MainSeqCount
            ActivePresentation.Slides(1).TimeLine.MainSequence(Counter).MoveTo TargetPosition
            TargetPosition = (TargetPosition + 2)
        Next Counter
    
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •