Peter_Michael96
Peter_Michael96

Reputation: 11

VBA PowerPoint 2007 - How do i trigger a slide change after a specific animation end?

I am working on a game created in PowerPoint. I have an exit animation attributed to an image, on a specific slide (ex: the 6th one) that takes 7 seconds to complete. This part is easy, I've done it without VBA. Now i am trying to execute the following code after this animation ends:

With SlideShowWindows(1).View
    .GotoSlide 17, msoFalse
End With

It's like a countdown that sends the user to a "Game Over" slide. I've tried multiple solutions to this problem like applying DoEvents loops with specific amounts of seconds, Sleep or Delays, but some of them just crashed my presentation or made it unresponsive(that makes all the game useless).

Is there any way to "catch" the end of an animation in PowerPoint so it can trigger that slide change or any other line of code?

Thank you!

Upvotes: 0

Views: 615

Answers (1)

Peter_Michael96
Peter_Michael96

Reputation: 11

-This is not the answer for the main question, but i have found a workaround for my case-

The problem in my case was that each slide, or "level" had a countdown which result in a "Game Over" after a specific amount of time (Advance Slide Automatically After X Time).

Initially, my slideshow was designed like this, so it required a timer/end of an animation trigger to step into a "Game Over" slide placed at the end of presentation:

The initial order of slides

However, I have found another positioning of slides that doesn't require extra VBA code, only the one that i attached to the main question. I have placed a copy of the "Game Over" after each level, so only by accomplishing the level you could step-by the red-slide. On each intermediate red-slide i've placed an invisible hyperlink whick leads to the final "Game Over" slide which is in fact a black screen:

My solution without using extra VBA

*(explanation of arrows: green arrows means that the condition of the level was accomplished; the red arrows means failure)

Upvotes: 1

Related Questions