More checkbox questions

  • Thread starter Thread starter Peter Morris
  • Start date Start date
P

Peter Morris

I have a project in which I am creating PPT slides which mimic a program
which cannot curently be used. I have successfully recreated everything
except this last module in which the user can select up to four items. The
user clicks Next for the 1st selected item. On the conclusion of that
presentation he is taken to the next selected item. And so on through each
of the selected items.

I need to recreate this behavior in PPT. I have read how to create a clever
checkbox of reasonable size. But how do I "save" the information of which
boxes have been selected and go to just those presentations?

Thanks,

Peter
 
If you are just wanting to click on a button and jump to another slide
and then come back and have a check box there to indicate that you have
done that, you should be able to use animation triggers. When you return
to the menu slide, the animations (in this case the checks appearing)
should sill be there.

If you want to do something more complex, such as have the checks stay
after you have closed the presentation and come back, that will require
VBA. You might want to look at Example 7.10 on my site:

http://www.PowerfulPowerPoint.com/

Just click on "Examples by Chapter" and then "Chapter 7" to find the
example.

--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.PowerfulPowerPoint.com/
 
David,

Thanks for the response. Picture 4 or 5 menu items with checkboxes in front
of them. The user checks number 1, 3 and 4. The user clicks, say, a button
labeled "Continue" and the presentation associated with No. 1 is started.
When No. 1 is competed, the user goes to No. 3. When No. 3 completes, No. 4
begins.

Next time the menu is run, perhaps the user selects 2, 4 and 5 and the
presentation begins with 2, moves to 4 then 5. And so on.

I expect there is some coding involved and that worries me a bit, because my
brain doesn't seem to be as spry as it once was, but I really need to get
the project completed so I will stretch and hopefully, with the help of kind
folks like you, get sufficient understanding to make it work!

Anyway, I hope my description above is clear.

Regards,

Peter
 
Aha. That makes perfect sense, and the coding shouldn't be too bad. In
fact, here is the main coding that you need. All you need to do is put 5
check boxes on slide number 2 (the menu slide) using the control toolbox.
Then you need six buttons: one on the menu slide and one at the end of
each "presentation." Note that I'm assuming that these "presentations"
are in the same slide show, but a little tweaking could easily work to
have them in different slide shows. If you use buttons from the control
menu, you will need to put GotoNext in the Click procedure for each
button. If you use AutoShapes, then you will need just need to set the
Action Settings for each button to run the macro GotoNext.

Also note the comments. I have assumed in GotoNext that each
"presentation is one slide long, but just changing the numbers after
GotoSlide to correspond to the first slide of each "presentation" will
work.

This was even easier than I thought and it took me longer to add comments
to the code and write this message than to actually write the code.

Let me know if you want me to email you my working sample.

Dim curPresentation As Long
Dim nextPresentation As Long
'Based on which checkboxes are checked on slide 2 and what the current
'"preseentation" is, decide what is the next presentation.
Sub WhatsNext()
If Slide2.CheckBox1.Value = msoTrue And curPresentation < 1 Then
nextPresentation = 1
ElseIf Slide2.CheckBox2.Value = msoTrue And curPresentation < 2 Then
nextPresentation = 2
ElseIf Slide2.CheckBox3.Value = msoTrue And curPresentation < 3 Then
nextPresentation = 3
ElseIf Slide2.CheckBox4.Value = msoTrue And curPresentation < 4 Then
nextPresentation = 4
ElseIf Slide2.CheckBox5.Value = msoTrue And curPresentation < 5 Then
nextPresentation = 5
Else
nextPresentation = 0
End If
End Sub

'This procedure actually goes to the appropriate slide. It should be tied
'to a button at the end of every "presentation."
Sub GotoNext()
WhatsNext 'decide what is next setting the value of nextPresentation
'This assumes that the menu is on slide 2 and that each
'"presentation" is
'on consecutive slides from 2 through 7. If that is not the case,
'just change the numbers after GotoSlide.
Select Case nextPresentation
Case 0
'return to the menu slide when all slides are done
ActivePresentation.SlideShowWindow.View.GotoSlide 2
Case 1
ActivePresentation.SlideShowWindow.View.GotoSlide 3
Case 2
ActivePresentation.SlideShowWindow.View.GotoSlide 4
Case 3
ActivePresentation.SlideShowWindow.View.GotoSlide 5
Case 4
ActivePresentation.SlideShowWindow.View.GotoSlide 6
Case 5
ActivePresentation.SlideShowWindow.View.GotoSlide 7
End Select
curPresentation = nextPresentation
End Sub


--
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.PowerfulPowerPoint.com/
 
David,

Thank you so very much! I've sent the message to work, where I will study
and attempt to implement. This is great. I may have more questions as it's
been many years since I attempted any VBA programming (and I don't recall a
great deal of success form that experience!).

Peter
 
I was exactly searching for the same time of solution, so from my part a big
thanks as well. However since I have never worked with VBA programming it
will probabaly take me sometime to implement. David, could you please send me
the working example you were talking about?

Thanks anyway,
With kind regards,

Maarten Bal
(e-mail address removed)
 
Maarten,

The example is on the way.

--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.PowerfulPowerPoint.com/
 
David,

Thank you for your sample code. It helps. I just have to spend some time
thinking about my sequencing.

It looks like the checkboxes in you example are slightly larger than the
checkboxes I created. I do not see any way to enlarge the size of the actual
box so how'd you do that? Or is it just an optical illusion?

Thanks again,

Peter
 
David,

Another, unrelated question: I am using a two-color gradient fill as my
background. I have set my checkbox menu items to be transparent, which they
are in the edit screen. In the slide show, however, the checkbox menu items
display with a white background. Why? What am I missing?

Thanks,

Peter
 
David,

Here's my next question: (as described in my off-line message yesterday from
work) my application consists of a series of slides which the viewer has to
evaluate and select Yes or No. At present I am using those words as
hyperlinks and depending upon the choice, the viewer is moved to the linked
slide. I'm not quite clear how I insert your code to work with this
approach. Is this where I alter the code to simply send the viewer to the
appropriate slide number? Should I change from hyperlinked words to buttons
(would that make any difference)? If I understand aright, the last slide in
the series is the one which gets the "continue" button.

In thinking about it, I suspect this last bit about choices on each page may
be a significant wrinkle in the process, because this is a decision tree and
every page can lead to two different places. None the less, once the
'thread' is followed to the 'end' the user should move to the next
presentation. Argh, this seems like it's getting more complicated as I
write! 8-)>

I think I'm going to have to diagram this to get a clearer sense of what the
slide to slide movements can be.

Thanks for listening to me ramble!

Peter
 
I don't think you can change the size of check boxes. I just added a
regular checkbox from the control toolbox. Perhaps, it is an optical
illusion. I don't know.
--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.PowerfulPowerPoint.com/
 
I see what you mean. I'm not sure how to correct that without a complicated
workaround that involves faking checkboxes with autoshapes (and probably
more VBA code). I wonder if anyone else has any ideas about this.
--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.PowerfulPowerPoint.com/
 
Within a "presentation" your hyperlinks should continue to work. My code
simply deals with which "presentation" to go to next. If, within a
"presentation," a choice is supposed to do more than go to a particular
slide, then I suspect you will need to do something more complicated.
However, if the decision is just to go to slide A or slide B, then your
regular hyperlinks should work fine. All you need is to identify the last
slide in the "presentation" and put the continue button there.
--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.PowerfulPowerPoint.com/
 
This particular 'module' in my presentation is so convoluted, I finally sat
down with a flow chart program and diagramed it. Now I'm not so sure my idea
of selecting and only displaying the selected legs of the overall 'module'
is practical. With your permission, I'd like to send you a Word document
with the annotated flow diagram for your advice.

Peter
 
Yes, you can send it to me. I'll look at it when I have time.
--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.PowerfulPowerPoint.com/
 
Thank you, David, for your willingness to help! I looked at what I have and
finally figured out a somewhat less complicated way to solve the problem.

Peter
 
Great. Do you want to tell us what you came up with, at least a brief
synopsis. Does it involve VBA code?
--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.PowerfulPowerPoint.com/
 
Not at all. First: no VBA code. There are many different threads through
these slides and it turns out that apparently I hadn't explored thoroughly
enough. I had made an assumption as to how the program worked that was in
error. That is, even though several items on the menu can be selected when
you click on next, all of the menu choice destinations are displayed on one
long page. Very inelegant, but more to the point, I realized that simply
using the standard checkbox object as a 'marker' or reminder would be
sufficient. At the end of each thread that proceeds from the menu I simply
returned to the menu where the remaining checked boxes would tell me where
to go next. This probably won't make sense without a little more explanation
for other readers. (The PPT slide sets are an attempt to mimic a software
program a cannot use at the present time. The program is a decision tree
which is displayed during a recurring meeting and provided instructions for
the various steps. So when we get to the menu, the participants indicate
which menu items apply, we follow each thread back to the menu and embark
down the next thread, and so on until each selected thread has been viewed.)
So this solution, while not as cool as what you built, David, is quite
functional and actually closer to the original.

Thank you all for your great ideas and suggestions!

Peter
 
Thanks. I guess the mistake was that you assumed that the original
program was actually smart. We tried to create something smart only to
find that something not-so-smart was needed. At least, the not-so-smart
solution is easy to create.
--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.PowerfulPowerPoint.com/
 
Back
Top