How to create combo box in the slide

B

Bernard Guzman

Hi,

How can I make a combo box in Powepoint to call the other
Programs or Slide? I need your assistance, please.

Thanks and regards,
Bernard
 
B

Bill Dilworth

Creating one is not the difficulty, that is done via View | Toolbars |
Control Toolbox then clicking on the pulldown box and drawing it onto the
slide.

The problem is in populating it and using the answers for links. For that
you need VBA. But don't worry, this will get you most of the way there.

====Insert this code=========
Option Explicit

Private Sub ComboBox1_BeforeDropOrPaste(ByVal Cancel As
MSForms.ReturnBoolean, ByVal Action As MSForms.fmAction, ByVal Data As
MSForms.DataObject, ByVal X As Single, ByVal Y As Single, ByVal Effect As
MSForms.ReturnEffect, ByVal Shift As Integer)
'NOTE ** the above line is all on
' one a single line of code.
' Watch for NG textwrap.

Dim X As Integer

'Clear the combobox
ComboBox1.Clear

'Load the combobox
For X = 1 To 5
ComboBox1.AddItem "Slide #" & Str(X)
Next X
End Sub


Private Sub ComboBox1_Change()

With ComboBox1

'Check for valid selection
If .ListIndex = -1 Then Exit Sub

'Remove this after debugging
MsgBox "Index is " & .ListIndex & _
vbCr & "Text is " & .Value & _
vbCr & "Jumping to Slide #" & _
Str(.ListIndex + 1)

'This will advance the show to the selected slide
'Note that the list index begins with zero _
and slides begin with one, so there is an _
offset added
SlideShowWindows(1).View. _
GotoSlide .ListIndex + 1
End With
End Sub
=======End=============

If you have any questions about the code, holler back.


--
Bill Dilworth, Microsoft PPT MVP
===============
Please spend a few minutes checking vestprog2@
out www.pptfaq.com This link will yahoo.
answer most of our questions, before com
you think to ask them.

Change org to com to defuse anti-spam,
ant-virus, anti-nuisance misdirection.
..
..
 
B

Bernard

Hi Bill,

Thank you for your immediate assistance. I will try to
use this script and hope it will help.

Regards,
Bernard
 

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