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:
Other People Are Reading
Things you need
- Microsoft Office 2007 or later
Launch Microsoft PowerPoint from the "Start" menu.
Open the slideshow you want to use with the random slide macro.
Click on the Office symbol to open the menu.
Click "PowerPoint Options" and navigate to the "Trust Center."
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.
Click "Popular" and verify that "Show Developer Tab in the Ribbon" is enabled. Click "OK" to return to the presentation.
Do the Initial Setup
Press "Alt" + "F11" to open the Visual Basic Editor.
Click "Insert" and choose "Module."
Copy and paste the code below into the editor window.
ActivePresentation.SlideShowWindow _ .View.GotoSlide Int(Rnd * _ ActivePresentation.Slides.Count) + 1
Press "Alt" + "Q" to save the macro and return to the presentation.
Create the Visual Basic Macro
Click the "Insert" tab and then the "Shapes" button.
Click on the desired shape under the "Action Buttons" heading at the bottom of the drop-down menu.
Click on the work area, and drag the shape to the desired size.
Click the radio button beside "Run macro" in the dialogue box that appears, and select the "sort_rand" macro you created earlier. Click "OK."
Press "Ctrl" + "C" with the button selected to copy it to the clipboard.
Click on the next slide in the left pane.
Press "Ctrl" + "V" to paste the button into the slide. Repeat this for each slide in the presentation.
Press "F5" to begin the slideshow from the first slide.
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.
Create the Action Button
Tips and warnings
- You can turn any object into a button by selecting it and clicking "Action" under the "Insert" tab.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for