Slides in random order

J

juuso

I have bingo-presentation which includes numbers 1-100 (in random
order). Does PowerPoint 2003 have any option to show those slides in
random order everytime i start slideshow?

Best wishes, Juuso
 
J

juuso

Thanks David! That worked!

Propably it would be quite easy to modify macro so that the ten first
slides (information) stayed in order and the rest (numbers) were randomized.
I tried hard, without any luck! Any help? Thanks.

Juuso

David M. Marcovitz kirjoitti:
 
J

John Wilson

The code would be something like

Private Sub CommandButton1_Click()
Randomize
ActivePresentation.SlideShowWindow _
..View.GotoSlide Int(Rnd * _
(ActivePresentation.Slides.Count - X)) + Y
End Sub

Where you substitute the first random slide number for Y and one number
less for X

So for you example

Private Sub CommandButton1_Click()
Randomize
ActivePresentation.SlideShowWindow _
..View.GotoSlide Int(Rnd * _
(ActivePresentation.Slides.Count - 10)) + 11
End Sub
 
J

John Wilson

That was for the control button version, just realized you mean the randomize
slides one!

It would be :

Sub sort_rand()
Dim i As Integer
Dim myvalue As Integer
Dim islides As Integer
Randomize
islides = ActivePresentation.Slides.Count
For i = 11 To ActivePresentation.Slides.Count
myvalue = Int(Rnd * _
(ActivePresentation.Slides.Count - 10)) + 11
ActiveWindow.ViewType = ppViewSlideSorter
ActivePresentation.Slides(myvalue).Select
ActiveWindow.Selection.Cut
ActivePresentation.Slides(islides - 1).Select
ActiveWindow.View.Paste
Next
End Sub
 

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