how to make next slide random in powerpoint

  • Thread starter Thread starter alford
  • Start date Start date
A

alford

I am a middle school teacher and I am trying to create a Wheel of
Fortune Game in powerpoint for my students. I have created a money
wheel for the students to click on. I need to know how to set it up so
that when the students click the wheel it will take them to a random
slide (from slides 20-40) to give them a dollar amount. I have been
told that there is a way to do it in VBA but I have no idea how to even

get started. Can you please help? Thank you, T Alford
 
Pretty sure that you can only do this in VBA using the Randomize and Rnd
instructions and then either view a random slide or make visible a random
shape. I can't think of a way to do it in "normal" powerpoint.

Unfortunately you cant learn enough vba here!

David Marcovitz's book would help (no doubt he'll be along shortly!)
 
You can jump to a random slide by creating a small macro, then triggering it
from an action setting during the show.

Steps:

1) Open the VBE
Hit Alt + F11

2) Paste the text between the lines into the VBE
=====Start-=====
Sub JumpToRandomSlide()

Dim SldRng As Integer
Dim SldStart As Integer

'Number of slides in the range
SldRng = 20

'First slide in that range
SldStart = 20

'Do It
SlideShowWindows(1).View.GotoSlide _
Int(Rnd() * SldRng) + SldStart

End Sub
=====End=====

3) Add a shape to the slide as a 'Launching point"

4) Set the Action setting on the shape
Select the shape on the slide
Right Click
Select Action Settings
Select Run Macro
Select JumpToRandomSlide

4) Save presentation and run

On the slide you want to jump from, click on the shape (the pointer will
become a finger when the mouse cursor is over it)

Make sure that the Macro Security setting is on Medium or Low.

--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com www.pptfaq.com
..
 
Thanks John. I actually sent the original poster to the newsgroup after
getting asked the question in email. I figured there were three choices:
(1) learn enough VBA to do it yourself (either through my book or some
other means); (2) find someone who already has a Wheel of Fortune Game;
or (3) get someone else to write the code. I suggested my book as a
possibility for (1) and the newsgroup as a possibility for (2) and (3)
because I didn't have time to do (3) myself. As it turned out, the
newsgroup came through, and Bill sent along the code.
--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/
 
Back
Top