How to update (refresh) slide using a loop in real time in VBA PowerPoint
I am trying to operate an animation loop that moves a shape called "aircraft" between certain coordinates.
Right now I am using the loop below but it seems that "DoEvents" doesn't work in Powerpoint like it does in Excel. The shape, instead of moving along a horizontal line it updates its position only when the loop ends.
I need to to move the shape (a picture named "aircraft") from coordinate x=100 to coordinate x=200 in quick small steps.
I also want to make sure that I can run secondary macros during the operation of this loop - just like the DoEvents statement would allow you to do in Excel. Thanks!
For i = 1 To 100
ActivePresentation.Slides(2).Shapes.Range(Array("aircraft")).Left = 100 + i
Last edited by geo77; 05-18-2020 at 07:56 PM.
Re: How to update (refresh) slide using a loop in real time in VBA PowerPoint
Any reason you are not using the animation, motion paths, built into ppt?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By Tyger0951 in forum PowerPoint Formatting & General
Last Post: 10-15-2019, 10:38 AM
By whahnelt in forum Office 365
Last Post: 07-18-2019, 07:43 AM
By CoolkcaH in forum PowerPoint Programing
Last Post: 05-02-2017, 07:10 AM
By email@example.com in forum Excel Programming / VBA / Macros
Last Post: 08-18-2015, 06:39 AM
By angel2903 in forum Excel Programming / VBA / Macros
Last Post: 07-31-2015, 12:43 PM
By Tyger0951 in forum Excel Programming / VBA / Macros
Last Post: 07-31-2014, 02:51 AM
By kpierce in forum Excel Programming / VBA / Macros
Last Post: 06-29-2011, 02:11 AM
Tags for this Thread
Search Engine Friendly URLs by vBSEO 3.6.0 RC 1