Possible to automate a slide show with variable speed forwards andbackwards?

S

Spiggy Topes

I have a presentation built with 365 daily images of an Excel chart,
to show how data coming into a system affects recent history. I can
set it to run at a fixed forward speed, but it would be better if I
could vary the speed without recourse to manually changing the
automatic advance time, and better still if I could do the same thing
backwards.

If the VB Timer control was available, I could doubtless use it to
control which slide comes next and after how long. But I don't see it
under Additional Controls, so I'm guessing it's not available. If you
know different, let me know where to find it and I'll have a workable
solution.

Failing that, I can use the same technique (I hope...) with a
horizontal scroll bar control to determine speed and direction, and (I
hope...) vary the automatic advance delay for all slides, letting
Powerpoint do the actual navigation. But I don't see any reference
anywhere to traversing a presentation automatically backwards. I can't
set .AdvanceTime to a negative number - tried it, I get "floating
point value out of range". I suppose I could duplicate the slide show
in reverse order back to back with the current set - so for reverse
navigation I use slides 366 - 730 forwards, and to change directions I
just skip to slide number (730 - current slide number) and keep going
forwards.

Any better way to do this?
 
C

Chirag

You can perhaps make use of Timer APIs instead. The Timer APIs can be used
as follows:

---
Private Declare Function SetTimer Lib "user32" ( _
ByVal hwnd As Long, _
ByVal nIDEvent As Long, _
ByVal uElapse As Long, _
ByVal lpTimerFunc As Long) As Long
Private Declare Function KillTimer Lib "user32" ( _
ByVal hwnd As Long, _
ByVal nIDEvent As Long) As Long

Private TimerId As Long

Private Sub TimerProc(ByVal hwnd As Long, _
ByVal uMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long)
' Your OnTimer handler
End Sub

Sub StartTimer()
' Call TimerProc every 1000 millisecond
TimerId = SetTimer(0, 0, 1000, AddressOf TimerProc)
End Sub

Sub StopTimer()
KillTimer 0, TimerId
End Sub
---

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
 
S

Spiggy Topes

Thanks! That works a treat. The only snag I hit was that the timer has
to be started and stopped in a module, rather than on a form. Having
figured that one out, I now have a slide show which can be run
backwards or forwards and paused, with speed controllable by the user
without having to actually stop and change presentation parameters,
all in 60 lines of code. Just what I needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top