VBA to make a button appear after all exercises are done

G

Guest

Hi to all,

I am quite new to VBA. In fact, I bought a book to help me but I haven't had
the time to read it all yet. So I need help with something I would like to
do. I know it's a lot to ask, but if someone has the time to help, I will be
very grateful.

I made a PowerPoint (2003) where the student sees all the pictures of the
oral motor exercises he will have to do on one slide. If he clicks on one of
those exercises, the PPT brings him to another slide where there is a movie
of the exercise. He tries to do the same thing and clicks on the button that
brings him back to the exercises menu. I made a semi-transparent rectangle
appear on the picture of the exercise so that the student knows what
exercises are done. The student cannot get out of the PPT except if he clicks
on the finish button.

I would like the finish button to appear only after all the semi-transparent
rectangles had appeared, i.e. after all the exercises are done. I have 8
rectangles: rectangle 11, rectangle 12, rectangle 13, rectangle 14, rectangle
15, rectangle 16, rectangle 17, and rectangle 19. The finish button is called
"bouton d'action : personnalisé 20 : FIN".

Christine./
 
S

Steve Rindsberg

Hi to all,

I am quite new to VBA. In fact, I bought a book to help me but I haven't had
the time to read it all yet. So I need help with something I would like to
do. I know it's a lot to ask, but if someone has the time to help, I will be
very grateful.

I made a PowerPoint (2003) where the student sees all the pictures of the
oral motor exercises he will have to do on one slide. If he clicks on one of
those exercises, the PPT brings him to another slide where there is a movie
of the exercise. He tries to do the same thing and clicks on the button that
brings him back to the exercises menu. I made a semi-transparent rectangle
appear on the picture of the exercise so that the student knows what
exercises are done. The student cannot get out of the PPT except if he clicks
on the finish button.

I would like the finish button to appear only after all the semi-transparent
rectangles had appeared, i.e. after all the exercises are done. I have 8
rectangles: rectangle 11, rectangle 12, rectangle 13, rectangle 14, rectangle
15, rectangle 16, rectangle 17, and rectangle 19. The finish button is called
"bouton d'action : personnalisé 20 : FIN".

Are you already using VBA to make the buttons appear?

If so, you could simply declare a public variable:

Public lButtonCount as Long

Then in addition to whatever other code you use to make the buttons visible, add
this:

' increment button count
lButtonCount = lButtonCount + 1

If lButtonCount > 7 Then
' Watch out for line breaks
' Substitute the actual slide number for 42 below
ActivePresentation.Slides(42).Shapes("bouton d'action : personnalisé 20 :
FIN").Visible = True
End If
 
G

Guest

Thanks for your answer Steve,

But no, I wasn't using VBA on my PPT yet. The buttons appear with triggered
animation, i.e. when the student clicks on an exercise, a semi-tranparent
rectangle appears over it.
 
S

Steve Rindsberg

Christine Fournier said:
Thanks for your answer Steve,

But no, I wasn't using VBA on my PPT yet. The buttons appear with triggered
animation, i.e. when the student clicks on an exercise, a semi-tranparent
rectangle appears over it.

It might be simplest to use VBA instead of triggers then. That gives you a way to
run your code whenever the user clicks something. Otherwise it gets very complicated
very quickly.
 
D

David M. Marcovitz

Christine,

The kinds of things you want to do are described in my book (see
http://www.PowerfulPowerPoint.com/). You might want to check out Example
7.11 from the Web site (pages 113-115 in the book). This example has a
shape that you don't want to show until several other things have
happened. In this example, the shape is a Quiz button that appear after
all the sections of the tutorial have been completed.

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

=?Utf-8?B?Q2hyaXN0aW5lIEZvdXJuaWVy?=
 
G

Guest

Thanks again Steve,

I prefer to minimize the use of VBA because I'm not sure all my students
have PowerPoint2003 at home. This way, I can make a CD of the activity with
PowerPoint Viewer integrated. As you know, the VBA won't work. If it only
prevent the button "End" to appear, it's not too bad (I'll just have a note
telling them to use the "Escape" key). But if I use VBA to show which
exercice has been done and which hasn't, then it's a bit problematic...

Christine./
 
S

Steve Rindsberg

Thanks again Steve,

I prefer to minimize the use of VBA because I'm not sure all my students
have PowerPoint2003 at home. This way, I can make a CD of the activity with
PowerPoint Viewer integrated. As you know, the VBA won't work. If it only
prevent the button "End" to appear, it's not too bad (I'll just have a note
telling them to use the "Escape" key). But if I use VBA to show which
exercice has been done and which hasn't, then it's a bit problematic...

Given the requirements and the fact that the End key isn't critical, I'd say you've made
exactly the right decision, Christine.
 

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