Want Pause button with timeout for slideshow

P

PPMacroBuilder

I would like to insert a Pause button in a Powerpoint slideshow (for
kiosk use) that continues to display the current slide until it is
pressed again or until a specific time has elapsed, whichever comes
first. Then the slideshow should continue as normal. I believe it
should be possible to write a Visual Basic macro to achieve this, but I
have not found the appropriate timer related function(s) to use. Any
help will be appreciated.
 
D

David M. Marcovitz

Very basic timing example is at Example 8.4 on my site:

http://www.PowerfulPowerPoint.com/

Click on "Examples by Chapter" and "Chapter 8."

I would think you could have the button remove the setting for the slide
to auto-advance and reset the setting after a certain amount of time or
after a button click.

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
P

PPMacroBuilder

Having managed to answer my own question with help from David Marcovitz
and the MS VB Programmer's Guide, I thought I would post it for others
who may find it useful. After creating a Command Button from the
Control Toolbox and labeling it "Pause", insert the following code in
the "click" function for the button.

Private Sub CommandButton1_Click()
Static blnPaused As Boolean
If blnPaused Then
blnPaused = False
CommandButton1.Caption = "Pause"
Else
blnPaused = True
CommandButton1.Caption = "Continue"
waitTime = 30 ' Pause in seconds
Start = Timer
Do While blnPaused And Timer < Start + waitTime
DoEvents
Loop
blnPaused = False
CommandButton1.Caption = "Pause"
End If
End Sub

For a slideshow with timings set to 5 seconds per slide, pressing this
button will cause the current slide to continue to display for 30
seconds or until the button is pressed again, after which the slideshow
will resume.

I hope someone finds this useful and I thank David for his helpful
pointer.
 

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