VB code in Powerpoint 2000

  • Thread starter Thread starter Tarah
  • Start date Start date
T

Tarah

I am looking for a way to have the slide show return to
the first slide after it has been idle for 2 minutes.
Please help - I'm on a major deadline!!
 
If you set the presentation to Kiosk Mode (in the Slide Show menu under
Set Up Show), it will return to the first slide after a short time (I
think it is 5 minutes). This has three drawbacks:

(1) you can't set the time you want; you have to use whatever is built in
(2) it doesn't work in one version of PowerPoint (I think it is a but in
2002)
(3) all navigation must now be down with buttons (you won't be able to
hit the space bar or the mouse button or ... to move around) or run
animations (make all animations automatic)

--David

--
David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
This didnt work. We already had it in kiosk mode. What
setting should the timing be on? It can either be on
manual or automatic mode.
Is there any other way to do this?
 
OK. You must have the version that does not go back to the beginning
after 5 minutes in Kiosk mode. I thought it was 2002, but perhaps it was
2000 and 2002. Here is some VBA code that should help, but it is going
to require a fair amount of work on your part to implement this (unless
all you do is go from one slide to the next to the next.

Dim startTime As Long

Sub Initialize()
NextSlide
Wait
ActivePresentation.SlideShowWindow.View.GotoSlide 1
End Sub
Sub Wait()
waitTime = 120
startTime = Timer
While Timer < startTime + waitTime
DoEvents
Wend
End Sub
Sub NextSlide()
ActivePresentation.SlideShowWindow.View.Next
startTime = Timer
End Sub

After putting this code in a module, you need to do the following:

(1) Put a button on your title slide and link it to the Initialize
procedure.
(2) On every other slide, put a button that is linked to the NextSlide
procedure.
(3) If you want to do anything other than go to the next slide, you will
need to do that in a procedure that includes the line startTime = Timer.
For example to go to the previous slide put a button and link it to the
following PreviousSlide procedure:

Sub PreviousSlide()
ActivePresentation.SlideShowWindow.View.Previous
startTime = Timer
End Sub

Or to go to the 17th slide, use the following procedure:

Sub GoTo17thSlide()
ActivePresentation.SlideShowWindow.View.GotoSlide 17
startTime = Timer
End Sub

The key to this whole thing is that the variable startTime must get reset
every time you do anything so that the counting of 2 minutes can start
over.

Also, if you want the time to be something other than 2 minutes, change
the number 120 to some other number of seconds.

If you send me email (remove the NOSPAM from my email address), I'll send
you the little example I cooked up. As you can see, the code is really
easy. The hard part is getting all your buttons and hyperlinks to use
the code.

--David



--
David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Back
Top