Advertisement
Guest User

Untitled

a guest
May 31st, 2016
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Sub shufflerange()
  2. Dim Iupper As Integer
  3. Dim Ilower As Integer
  4. Dim Ifrom As Integer
  5. Dim Ito As Integer
  6. Dim i As Integer
  7. Iupper = InputBox("What is the highest slide number to shuffle")
  8. Ilower = InputBox("What is the lowest slide number to shuffle")
  9. If Iupper > ActivePresentation.Slides.Count Or Ilower < 1 Then GoTo err
  10. For i = 1 To 2*Iupper
  11. Randomize
  12. Ifrom = Int((Iupper - Ilower + 1) * Rnd + Ilower)
  13. Ito = Int((Iupper - Ilower + 1) * Rnd + Ilower)
  14. ActivePresentation.Slides(Ifrom).MoveTo (Ito)
  15. Next i
  16. Exit Sub
  17. err:
  18. MsgBox "Your choices are out of range", vbCritical
  19. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement