Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to Make the Next Slide Random in PowerPoint
- By Kenrick Callwood
- 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.
- Do the Initial Setup
- Step
- Launch Microsoft PowerPoint from the "Start" menu.
- Step
- Open the slideshow you want to use with the random slide macro.
- Step
- Click on the Office symbol to open the menu.
- Step
- Click "PowerPoint Options" and navigate to the "Trust Center."
- Step
- 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.
- Step
- 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
- Step
- Press "Alt" + "F11" to open the Visual Basic Editor.
- Step
- Click "Insert" and choose "Module."
- Step
- Copy and paste the code below into the editor window.
- Sub sortrand()
- ActivePresentation.SlideShowWindow.View.GotoSlide Int(Rnd * ActivePresentation.Slides.Count) + 1
- End Sub
- Step
- Press "Alt" + "Q" to save the macro and return to the presentation.
- Create the Action Button
- Step
- Click the "Insert" tab and then the "Shapes" button.
- Step
- Click on the desired shape under the "Action Buttons" heading at the bottom of the drop-down menu.
- Step
- Click on the work area, and drag the shape to the desired size.
- Step
- Click the radio button beside "Run macro" in the dialog box that appears, and select the "sort_rand" macro you created earlier. Click "OK."
- Step
- Press "Ctrl" + "C" with the button selected to copy it to the clipboard.
- Step
- Click on the next slide in the left pane.
- Step
- Press "Ctrl" + "V" to paste the button into the slide. Repeat this for each slide in the presentation.
- Step
- Press "F5" to begin the slideshow from the first slide.
- Step
- 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.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement