Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / June 2007

Tip: Looking for answers? Try searching our database.

Randomize animation order of objects

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
krd.public@gmail.com - 30 May 2007 02:07 GMT
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!
David M. Marcovitz - 30 May 2007 14:27 GMT
It's certainly possible with VBA, but I don't know of a solution that is
already written for you.
--David

Signature

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/

krd.public@gmail.com wrote in news:1180487251.669840.290170
@g4g2000hsf.googlegroups.com:

> Question: Is there a way to randomize the order objects on a page
> appear?
[quoted text clipped - 7 lines]
> information to be appear randomly each time.  Using Powerpoint 2003.
> Thanks!
krd.public@gmail.com - 01 Jun 2007 15:53 GMT
On May 30, 8:27 am, "David M. Marcovitz" <marcoNOS...@loyola.edu>
wrote:
> It's certainly possible with VBA, but I don't know of a solution that is
> already written for you.
[quoted text clipped - 23 lines]
>
> - 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.
dedawson - 04 Jun 2007 19:43 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.