vba or clone slide for 'millionaire' game presentation

R

Ray

Hello everyone,

I have learned a lot just by lurking on the boards and perusing the faq
file.

What I would like is the pro-con for a presentation that is to mimic
the 'who wants to be a millionaire' game. I downloaded Mark Damon's
'who wants to be skeleton' and have inserted the questions and answers
in PP97. I want to set up something so when I click on the 50:50
part, the presentation then takes out two of the answers. I tried
doing some VBA code (as I learned just a learned macro would not work
in a presentation) but could not get the code to work, or have it
activate from the presentation. I am very new to this Here is what I
was using which was an adaptation of Bill Foley's note in a discussion
on Dec 7, 2004:

ActivePresentation.Slides(5).Shapes("text 13").Visible = False

'The code to hide a shape on Slide 3 would be:
'from Bill Foley, Microsoft MVP (PowerPoint)www.pttinc.com on Dec 7
2004 7:29 am
'ActivePresentation.Slides(3).Shapes("1-100").Visible = False

I was just trying to get one text box to hide before I tried two. :)
But when I click on the area for the presentation, nothing happened -
the slide looked the same. It did not act like I did an 'advance'
click (showing the answer), it just was still present.

My real question though is:
A) am I better off getting the code that hides a&b, another code that
hides a&c, etc.. Then for the particular slide select the 50:50 and do
an action setting that activates the appropriate macro (once I get it
working)

Or
B) copy and paste the finished slide right after the introductory
slide, then remove the two answers for the 50:50, then on the first
question slide, select the 50:50 object> action setting> and have it
hyperlink to the next slide (the one with the only 2 answers).

Thanks in advance for any help.
 
G

Guest

Well, if you are only using VBA to do the 50-50 and nothing else, you might
be better off just duplicating your slides with two of the answers missing.
However, if you use VBA for other things, you will save yourself a lot of
work by using VBA.

The trick to hiding objects is to know the name and/or number of the object
you want to hide. It will be best to do it by name. In order to know the name
of the object, it is best to name it yourself. You can use the code at
example 8.7 on my site to set the name of an object (click on Examples by
Chapter and Chapter 8):

http://www.PowerfulPowerPoint.com/

Once you have the name of an object, you could use the code you have below

ActivePresentation.Slides(5).Shapes("text 13").Visible = False

to hide that object (be sure you have some VBA at the beginning to make it
visible so it starts out visible; just change False to True). That code
assumes that you are trying to hide the object named "text 13" (after you
name the object, put that name there instead of text 13) on slide 5 (change 5
to the actual slide number--or name in quotes if you name the slide--that the
buttons to hide are on).

VBA has several advantages. Once you master this, you could randomize the
50-50 process (look at Example 8.13 on my site to start with random numbers),
so it doesn't hide the same two choices every time, and you can easily keep
track of whether the 50-50 lifeline has already been used (by either keeping
track in a variable or hiding the 50-50 button on all the slides).

--David

David M. Marcovitz
Microsoft PowerPoint MVP
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
R

Ray

Thank you David,

After reading your post, I thought cloning the slides might be the way
to go, but then as I am making more of the presentations from a
template, I am thinking learning the VBA might be better.

One thing you mentioned was to be sure I have some VBA at the beginning
to have the text box visible. How do I do that, and does that have to
be done with every box on every slide that I may use?

Thanks in advance.
 
D

David M. Marcovitz

Ray,

Once you are doing it in VBA, you will want to control the visibility of
everything with VBA. Fortunately, this mainly includes a lot of cutting
and pasting, even if you have to do this for many shapes. You might want
to look at example 6.4 on my site (http://www.PowerfulPowerPoint.com/).
It is a simple example that shows stars when a correct answer is chosen.
In the Initialize procedure, the stars are hidden.

The issue is that if anything is going to get hidden or shown during the
slide show, you want to be sure that what is supposed to start out hidden
starts out hidden, and what is supposed to start out showing, starts out
showing. I generally do this in an Initialize procedure, so the whole
presentation starts out right.

--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/
 

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