Navigating PowerPoint Using Radio Buttons or Combo
Boxes
You can create navigation controls
using Option Buttons or Combo Boxes from the Control Toolbox. These controls are designed
to provide an easy way to assign code to perform functions when they
are clicked. Below is a description of how to use Option Buttons
to navigate through your presentation. There is a sample download
for both Option Buttons and Combo Boxes at the bottom of the
explanation.
- Open a blank presentation and create four slides
- On Slide 1, right-click the toolbar area and click "Control
Toolbox"
- Click the "OptionButton" tool and draw a button on your slide
- With the button selected, press CTRL+D twice to duplicate two more
buttons. Move as necessary to align them (you can use the aligning
tools under the "Draw" button on the Drawing Toolbar"
- Right-click each button and select "Properties"
- Set the "Caption" property to "Slide 1", "Slide 2", "Slide 3" for
each of them respectively
- Click the "CommandButton" control from the Control Toolbox and
draw a button on the same slide
- Right-Click the button and select "Properties" (unless the window
is still open)
- Type "Select Slide" as the "Caption" property
- Close the "Properties" window
- Double-click the button and copy/paste the following code where
the cursor is:
Dim Slide2
As OptionButton
Dim Slide3
As OptionButton
Dim Slide4
As OptionButton
Set Slide2 =
ActivePresentation.Slides(1).Shapes("OptionButton1").OLEFormat.Object
Set Slide3 =
ActivePresentation.Slides(1).Shapes("OptionButton2").OLEFormat.Object
Set Slide4 =
ActivePresentation.Slides(1).Shapes("OptionButton3").OLEFormat.Object
If
Slide1.Value = True Then
ActivePresentation.SlideShowWindow.View.GotoSlide (2)
End If
If
Slide2.Value = True Then
ActivePresentation.SlideShowWindow.View.GotoSlide (3)
End If
If
Slide3.Value = True Then
ActivePresentation.SlideShowWindow.View.GotoSlide (4)
End If
- Close the Visual Basic Editor window or merely click the
PowerPoint taskbar button at the bottom to return to your slides
- Go to each of the three other slides and set the Slide layout to
have a Title placeholder on it and type something in each title to
ensure you know it is working (I typed "Slide 2", "Slide 3", "Slide
4")
- Go to Slide 2 and click the "AutoShapes" icon on the Drawing
Toolbar, select "Action Buttons" and click the top left button
(Custom). Draw a button on the slide.
- Click the "Hyperlink to" dropdown arrow and select "First Slide".
Click "OK" to close
- Right-click the button and select "Add Text". Type "Return". Press
"ESC" to select the button (get out of edit typing mode)
- Press CTRL+C to copy the button
- Press the PAGEDOWN button to go to the next slide and press CTRL+V
to paste the button on the next slide. Repeat for the last slide
- Go back to the first slide and go into Slide Show Mode and test it
out
Download File
To download the sample Option Button file -
Click
Here
To download the sample Combo Box file -
Click Here
Please keep in mind that this file (once unzipped) uses VBA and as
such your Macro Security MUST be set to MEDIUM and you MUST click
"Enable Macros" when asked.
If you would like to learn how PTT, Inc. can create
customized presentations using VBA, contact us
at info@pttinc.com. Be sure to check out
the CBT
sample at http://www.pttinc.com/cbt_development.htm.
|