Results 1 to 7 of 7

Thread: Implementing a Timer on a Slide using VBA

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,096
    Location
    The sleep APi basically puts the PC to sleep. So ... It probably won't see the click on the button.

    SetTimer is the way to do this but you really need to know what you are doing/ SetTimer calls a macro memory location every xxxx micro seconds. This will do what you need BUT if anything is wrong and the called macro is not at that locatiion or throws an error you will totally crash the PC. Shyam has sample code on the same page but be careful! If you are able to adapt it so KillTimer is always called on error try it ... Don't blame me (or Shyam) when it crashes though!

    You should make sure the Timer is killed when the slide show ends

    You could add this in the TimerProc

    If SlideShowWindows.Count < 1 Then
        bTimerState = True
        Call TimerOnOff
        Exit Sub
    End If
    It IS not completely foolproof though
    Last edited by John Wilson; 05-30-2011 at 09:43 AM.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

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