Using RadioButtons for jumping to a slide

P

ppt_puppet

I am using three radioButtons (say A, B & C) in ppt. What I want to achieve
is that if I select A, presentation should jump to Slide 2, if I select B,
then the presentation should jump to slide 3 and for C it should jump to
slide 4.
Please Assist!!!
 
S

Sonia

Have you tried linking the three buttons using Slide Show > Action Settings >
Hyperlink to > Slide?
--

Sonia Coleman
Microsoft PowerPoint MVP Team
Autorun Software, Templates and Tutorials
http://www.soniacoleman.com
 
P

ppt_puppet

Hi Sonia,

I tried using this. It is not possible because the option "Action Settings"
gets disable when using controls like radioButton. I tried the same for
other controls too but it doesn't work.

Is it possible by using a script? (But I am not very proficient in scripts!).

Thanks,

Imran
 
A

Austin Myers

Your making harder than it needs to be. Instead of a control, draw a shape
(a circle if you like) on the slide and then set it's action settings.


Austin Myers
MS PowerPoint MVP Team

Solutions to Multimedia in PowerPoint www.pfcmedia.com
 
U

Ute Simon

Your making harder than it needs to be. Instead of a control, draw a
shape
(a circle if you like) on the slide and then set it's action settings.

What Austin said - plus: If it MUST look like a radio button, then make a
screenshot of a radio button and use this picture to apply an action
setting.

Kind regards,
Ute
 
B

Bill Foley

The use of radio buttons are designed to be used with VBA code (scripting in
PowerPoint). But as Austin alluded to, it is much harder than it is worth.
Using Action Settings tied to any sort of image or object is much easier.
If you really want to learn how to do this using VBA, holler back.
 
P

ppt_puppet

Hi Bill,

I would love to learn how to do this using VBA. Please tell me how to do this.

Thanks,

Imran
 
D

David M. Marcovitz

The simplest thing is to draw a radio button (from the Control Toolbox),
double click on it and type the following procedure (the first and last
lines should already be there for you) into the code:


Private Sub OptionButton1_Click()
ActivePresentation.SlideShowWindow.View.GotoSlide 3
End Sub

The 3 means to take you to the third slide, so you can change that number
to anything else to go to a different slide.

Of course, you will want to do more complex things, like group radio
buttons and possibly jumpt to things other than slides by number. For
more information about using VBA with PowerPoint, see the Programming
PowerPoint section of the PPT FAQ:

http://www.rdpslides.com/pptfaq/#PROGRAMMING_POWERPOINT

--David
--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
B

Bill Foley

Sorry for the delay, getting ready for a class this morning. Try these
steps to get you started:

1. Open a blank presentation and create four slides
2. On Slide 1, right-click the toolbar area and click "Control Toolbox"
3. Click the "OptionButton" tool and draw a button on your slide
4. 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"
5. Right-click each button and select "Properties"
6. Set the "Caption" property to "Slide 1", "Slide 2", "Slide 3" for each of
them respectively
7. Click the "CommandButton" control from the Control Toolbox and draw a
button on the same slide
8. Right-Click the button and select "Properties" (unless the window is
still open)
9. Type "Select Slide" as the "Caption" property
10. Close the "Properties" window
11. 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

12. Close the Visual Basic Editor window or merely click the PowerPoint
taskbar button at the bottom to return to your slides
13. 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")
14. 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.
15. Click the "Hyperlink to" dropdown arrow and select "First Slide". Click
"OK" to close.
16. Right-click the button and select "Add Text". Type "Return". Press
"ESC" to select the button (get out of edit typing mode)
17. Press CTRL+C to copy the button.
18. 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
19. Go back to the first slide and go into Slide Show Mode and test it out.

Hope this gets you started. Remember, once you learn VBA you will be hooked
and will never get a good night's sleep again! HA!
 
P

ppt_puppet

Thank you all for your assistance.

Bill Foley said:
Sorry for the delay, getting ready for a class this morning. Try these
steps to get you started:

1. Open a blank presentation and create four slides
2. On Slide 1, right-click the toolbar area and click "Control Toolbox"
3. Click the "OptionButton" tool and draw a button on your slide
4. 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"
5. Right-click each button and select "Properties"
6. Set the "Caption" property to "Slide 1", "Slide 2", "Slide 3" for each of
them respectively
7. Click the "CommandButton" control from the Control Toolbox and draw a
button on the same slide
8. Right-Click the button and select "Properties" (unless the window is
still open)
9. Type "Select Slide" as the "Caption" property
10. Close the "Properties" window
11. 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

12. Close the Visual Basic Editor window or merely click the PowerPoint
taskbar button at the bottom to return to your slides
13. 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")
14. 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.
15. Click the "Hyperlink to" dropdown arrow and select "First Slide". Click
"OK" to close.
16. Right-click the button and select "Add Text". Type "Return". Press
"ESC" to select the button (get out of edit typing mode)
17. Press CTRL+C to copy the button.
18. 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
19. Go back to the first slide and go into Slide Show Mode and test it out.

Hope this gets you started. Remember, once you learn VBA you will be hooked
and will never get a good night's sleep again! HA!

--
Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor - XP
www.pttinc.com
Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top