Does anybody know how I can include a ComboBox in a slide in PowerPoint 97?
What I want to have is a drop-down list with options in there which, when
selected, will take me to a different slide.
Please help - wading through VB is not easy!
Thanks.
Rob Gould
gro...@nn.independent.co.za
Add the combo box to the slide
Rightclick it and choose Edit Combobox or View Code
Add the following:
Private Sub ComboBox1_GotFocus()
me.ComboBox1.AddItem("This")
me.ComboBox1.AddItem("That")
me.ComboBox1.AddItem("The other")
End Sub
Now start the slide show and click the combo. Clicking it will trigger the
GotFocus event, load the combo with stuff that you can then select.
Generally speaking, stuff like combos make more sense on forms rather than
directly on a slide.
--
Steve Rindsberg, PowerPoint MVP
Got a PowerPoint wish/suggestion/beef?
Email msw...@microsoft.com with PowerPoint in the subject line
PPT FAQ - http://www.rdpslides.com/pptfaq
RnR PPTools - http://www.rdpslides.com/pptools
ZAP! for service bureaus - http://www.rdpslides.com/zap
Rob Gould <gro...@nn.independent.co.za> wrote in message
news:3a112efd$0$2...@helios.is.co.za...
"Steve Rindsberg" <drop...@rathole.nul> wrote in message
news:#lZa#MkTAHA.174@cppssbbsa04...
You could do something like:
Private Sub ComboBox1_Change
msgbox me.ComboBox1.ListIndex
End Sub
That'll show you the number ( 0-based ) of the item picked. That is, if
they pick the first item on the list, it'll be 0, second is 1 and so forth.
You could then choose the right slide to go to based on the choice they
made.
I can't at the moment remember the correct code to get GotoSlide to work in
slide show view, but maybe somebody else will pop in with that.
--
Steve Rindsberg, PowerPoint MVP
Got a PowerPoint wish/suggestion/beef?
Email msw...@microsoft.com with PowerPoint in the subject line
PPT FAQ - http://www.rdpslides.com/pptfaq
RnR PPTools - http://www.rdpslides.com/pptools
ZAP! for service bureaus - http://www.rdpslides.com/zap
Rob Gould <gro...@nn.independent.co.za> wrote in message
news:3a114c4f$0$2...@hades.is.co.za...
Try this:
With SlideShowWindows(1).View
.GotoSlide 3, msoTrue
End With
This should go to Slide #3 and restart any animations on the slide. The
other use is the SlideID number. You can search HELP on this to see what
the SlideID is for each slide. That way if you move or add slides the slide
number (3) might change, but the SlideID will not.
Hope this helps.
Bill Foley
www.pttinc.com
Steve Rindsberg wrote in message ...
Oh, and that triggers another thought:
Grab PPTools, use the Slide Namer thingie to name each of the "target"
slides something meaningful.
Then put the same <something meaningful> into the list box contents. The
list box selection then becomes the SlideID and ya just go there. A wee
little bit more work, a LOT simpler to maintain, yowza.
--
Steve Rindsberg, PowerPoint MVP
Got a PowerPoint wish/suggestion/beef?
Email msw...@microsoft.com with PowerPoint in the subject line
PPT FAQ - http://www.rdpslides.com/pptfaq
RnR PPTools - http://www.rdpslides.com/pptools
ZAP! for service bureaus - http://www.rdpslides.com/zap
PTT, Inc. <ptt...@itexas.net> wrote in message
news:eb8Crwn...@cppssbbsa02.microsoft.com...
Forgot about the Slide Namer thingie (real technical, aren't ya?). I guess
I ought to try it out.
Thanks again
Rob
"PTT, Inc." <ptt...@itexas.net> wrote in message
news:O0KHIkr...@cppssbbsa02.microsoft.com...
If I get that, I can adapt it to my needs. Where can I get PPTools?
Thanks again.
Rob
"Rob Gould" <gro...@nn.independent.co.za> wrote in message
news:3a1523e8$0$2...@helios.is.co.za...
RnR PPTools - http://www.rdpslides.com/pptools
Will try to set up a sample for you, but things are kind of hectic here
today. Maybe Shyam can provide a quick example. (notice how I pass the
buck).
Bill Foley
www.pttinc.com
Rob Gould wrote in message <3a153315$0$2...@helios.is.co.za>...
' ===== Beginning Of Code =====
Private Sub ComboBox1_Change()
Dim IDX As Long
If ComboBox1.Text = "" Then Exit Sub
' Get the index of the slide since the GotoSlide requires an Index
IDX = ActivePresentation.Slides(ComboBox1.Text).SlideIndex
' Or you could also use :
' IDX = SlideShowWindows(1).Presentation.Slides(ComboBox1.Text).SlideIndex
'Move to the slide
SlideShowWindows(1).View.GotoSlide IDX
End Sub
Sub LoadCombo()
' Name the slides identical to the text in combo box
ActivePresentation.Slides(2).Name = "Second Slide"
ActivePresentation.Slides(3).Name = "Third Slide"
ComboBox1.Clear
With ComboBox1
.AddItem "Second Slide"
.AddItem "Third Slide"
End With
End Sub
' ===== End Of Code ====
Close the code window
Return to PowerPoint.
Select Tools|Macro|Macro...
Select LoadCombo routine to run it. This will load all the entries into the
combobox. Alternately you could also provide an shape set to Background
color and assign the loadcombo macro to run when clicked on it to load the
entries.
Run the show, make selection in combo box to move to appropriate slide.
--
Regards
Shyam Pillai
http://officetips.homepage.com
--
"PTT, Inc." <ptt...@itexas.net> wrote in message
news:OnLHqKKUAHA.174@cppssbbsa04...
Bill
Shyam Pillai wrote in message ...
For anyone who likes the idea, an additional suggestion would be to
make the combobox wide and narrow and change the font properties to a
small font size so the combo box wouldn't really be overly obtrusive
on the screen.
Thanks for the original code Shyam.
Brian Reilly PowerPoint MVP
'''''''''''''''''''''''''Shyam's code modified for SlideMaster''''''''
Private Sub ComboBox1_Change()
'Place a combobox on the SlideMaster
'Name a text box for the Slide "Title"
Dim IDX As String
If ComboBox1.Text = "" Then Exit Sub
'Get the index of the slide since the GotoSlide requires an Index
IDX = ActivePresentation.Slides(ComboBox1.Text).SlideIndex
'Move to the slide
SlideShowWindows(1).View.GotoSlide (IDX)
ComboBox1.Text = ""
End Sub
Sub LoadCombo()
'Name a textbox shape "Title" on every page and use that for the
combobox text
Dim i As Integer
Dim strTitle As String
ComboBox1.Clear
For i = 1 To ActivePresentation.Slides.Count
On Error GoTo Err_No_shpTitle
strTitle =
ActivePresentation.Slides(i).Shapes("Title").TextFrame.TextRange.Text
Use_Slide_Name:
ActivePresentation.Slides(i).Name = strTitle
With ComboBox1
.AddItem strTitle
End With
Next i
Exit Sub
Err_No_shpTitle:
strTitle = "Slide " & ActivePresentation.Slides(i).SlideIndex
Resume Use_Slide_Name
End Sub
On Fri, 17 Nov 2000 12:50:49 -0600, "PTT, Inc." <ptt...@itexas.net>
wrote:
"PTT, Inc." <ptt...@itexas.net> wrote in message news:OY85DbMUAHA.243@cppssbbsa04...
You should be aware that using ActiveX objects on the slides directly isn't
always advised if you intend to keep the presentation looping. It's known to
cause problems.
--
Regards
Shyam Pillai
http://officetips.homepage.com
--
"Brian Reilly, MS MVP" <br...@reillyand.com> wrote in message
news:3a1584a2...@msnews.microsoft.com...
--
Steve Rindsberg, PowerPoint MVP
Got a PowerPoint wish/suggestion/beef?
Email msw...@microsoft.com with PowerPoint in the subject line
PPT FAQ - http://www.rdpslides.com/pptfaq
RnR PPTools - http://www.rdpslides.com/pptools
ZAP! for service bureaus - http://www.rdpslides.com/zap
Shyam Pillai <Sh...@Asia.com> wrote in message
news:em9bbrQUAHA.173@cppssbbsa04...
It is obvious that Shyam's knowledge is well beyond his years and we should
all have the desire to be like him when we grow up! *cough, splutter*.
Thanks again,
Seeya!
"Sonia" <so...@nowhere.com> wrote in message
news:ugcQ0PNUAHA.243@cppssbbsa03...