How to Make the Next Slide Random in PowerPoint

Written by kenrick callwood Google
  • Share
  • Tweet
  • Share
  • Email

Microsoft PowerPoint makes it simple to build everything from professional presentations to multimedia kiosk exhibits. However, even with all of the built-in features, PowerPoint does not have a random slide command. You must use Visual Basic to make the next slide random in PowerPoint. The simplest method is to create an action button that will run a macro that calls for a random slide. Likely applications for this type of macro include games and picture slideshows.

Skill level:
Moderate

Other People Are Reading

Things you need

  • Microsoft Office 2007 or later

Show MoreHide

Instructions

    Do the Initial Setup

  1. 1

    Launch Microsoft PowerPoint from the "Start" menu.

  2. 2

    Open the slideshow you want to use with the random slide macro.

  3. 3

    Click on the Office symbol to open the menu.

  4. 4

    Click "PowerPoint Options" and navigate to the "Trust Center."

  5. 5

    Click the "Trust Center Settings" button, and click the radio button to "Disable all macros with notification." Click "OK" to return to the PowerPoint Options window.

  6. 6

    Click "Popular" and verify that "Show Developer Tab in the Ribbon" is enabled. Click "OK" to return to the presentation.

    Create the Visual Basic Macro

  1. 1

    Press "Alt" + "F11" to open the Visual Basic Editor.

  2. 2

    Click "Insert" and choose "Module."

  3. 3

    Copy and paste the code below into the editor window.

    Sub sort_rand()

    ActivePresentation.SlideShowWindow _
    
        .View.GotoSlide Int(Rnd * _
    
        ActivePresentation.Slides.Count) + 1
    

    End Sub

  4. 4

    Press "Alt" + "Q" to save the macro and return to the presentation.

    Create the Action Button

  1. 1

    Click the "Insert" tab and then the "Shapes" button.

  2. 2

    Click on the desired shape under the "Action Buttons" heading at the bottom of the drop-down menu.

  3. 3

    Click on the work area, and drag the shape to the desired size.

  4. 4

    Click the radio button beside "Run macro" in the dialogue box that appears, and select the "sort_rand" macro you created earlier. Click "OK."

  5. 5

    Press "Ctrl" + "C" with the button selected to copy it to the clipboard.

  6. 6

    Click on the next slide in the left pane.

  7. 7

    Press "Ctrl" + "V" to paste the button into the slide. Repeat this for each slide in the presentation.

  8. 8

    Press "F5" to begin the slideshow from the first slide.

  9. 9

    Click on the button you created to make the next slide a random slide. Every time you click on the button, the PowerPoint macro will select a random slide to display.

Tips and warnings

  • You can turn any object into a button by selecting it and clicking "Action" under the "Insert" tab.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.