Results 1 to 2 of 2

How to update (refresh) slide using a loop in real time in VBA PowerPoint

Threaded View

  1. #1
    Registered User
    Join Date
    04-16-2019
    Location
    london, england
    MS-Off Ver
    2003
    Posts
    1

    Cool 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!

    Sub shape_movement()
    For i = 1 To 100

    ActivePresentation.Slides(2).Shapes.Range(Array("aircraft")).Left = 100 + i
    DoEvents: DoEvents

    Next i
    End Sub
    Last edited by geo77; 05-18-2020 at 07:56 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PowerPoint live update excel data during slide show
    By Tyger0951 in forum PowerPoint Formatting & General
    Replies: 8
    Last Post: 10-15-2019, 10:38 AM
  2. Replies: 0
    Last Post: 07-18-2019, 07:43 AM
  3. Update the slide master from Slideshow Mode and refresh current slide
    By CoolkcaH in forum PowerPoint Programming
    Replies: 0
    Last Post: 05-02-2017, 07:10 AM
  4. Excel 2007 VBA code to close powerpoint slide show, but not powerpoint application
    By christopher@groth.cc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-18-2015, 06:39 AM
  5. PowerPoint to automatically update while in slide show mode
    By angel2903 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2015, 12:43 PM
  6. PowerPoint live update excel data during slide show
    By Tyger0951 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2014, 02:51 AM
  7. Copy Graphs and other Data into PowerPoint a slide at a time.
    By kpierce in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2011, 02:11 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1