Randomize animation order of objects

  • Thread starter Thread starter krd.public
  • Start date Start date
K

krd.public

Question: Is there a way to randomize the order objects on a page
appear?

Situation: Going to a random slide seems easy enough to implement with
VB, but I haven't found any similar solution for making objects on a
single page appear randomly (and I don't know enough about VB to write
my own script). I'm trying to use Powerpoint to create flashcards
where I give a little bit more information each time the user clicks
until they can guess what the slide is referring to. I'd like that
information to be appear randomly each time. Using Powerpoint 2003.
Thanks!
 
It's certainly possible with VBA, but I don't know of a solution that is
already written for you.
--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/

(e-mail address removed) wrote in @g4g2000hsf.googlegroups.com:
 
It's certainly possible with VBA, but I don't know of a solution that is
already written for you.
--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/

(e-mail address removed) wrote in @g4g2000hsf.googlegroups.com:





- Show quoted text -

Does anyone know how to use VB to animate a specific line in the body
text of a list? If so, I think I could add the "randomize" feature.
 
Kevin,

Although most of my VBA experience is with Word and Excel (for
PowerPoint, in fact, its none) your post tweaked my interest, so I did
a little poking around.

If I understand the problem correctly, you have a slide that has some
number of items to display, none of which are initially displayed.
With each click of the mouse, an additional item is displayed. What
you would like to do is display these items in a different random
order each time the slide is displayed.

So, let's assume you have 8 items that will be successively
displayed. Programmatically displaying the items in a given order is
no problem. See the PowerPoint VBA Help topic for AnimationOrder
Property and the AnimationSettings Object.

The more difficult part is in determining the random order that you
want to use in setting the AnimationOrder Property for the items to be
animated. What you need is a means of randomly generating each
integer in the range 1-8 number once and only once.

In general, one uses the Randomize() and Rnd() functions (search for
'Random' in PowerPoint VBA Help) to generate random numbers.
Unfortunately, these won't give you the complete solution you need
because even though the Rnd() function can generate numbers in the
range of 1-8, it will not guarantee that you get 8 unique numbers in 8
calls. You could well get the following returns: 5, 3, 8, 3, 1, 6,
2, 1, 4, 1, 7.

All is not lost however. Brian Duckworth has posted an excellent
solution to this problem on the Visual Basic Explorer site.
Specifically, http://www.vbexplorer.com/VBExplorer/random/random_numbers_1.asp
details the workings of the Randomize() and Rnd() functions, and
explains why they can't provide a unique set of numbers.
http://www.vbexplorer.com/VBExplorer/random/random_numbers_2.asp
provides the solution, which is to use a technique Brian calls
Jumbling (and two approaches to doing it to boot!). The idea, in 25
words or less, is to use the Rnd() function to reorder the list of 8
unique items, rather than use it to select the item numbers
themselves.

Good luck,

david
 
Back
Top