Powerful PowerPoint for Educators: Using Visual Basic for Applications to Make PowerPoint Interactive


Download 1.37 Mb.
Pdf ko'rish
bet42/191
Sana08.05.2023
Hajmi1.37 Mb.
#1442581
1   ...   38   39   40   41   42   43   44   45   ...   191
Bog'liq
2.2. Powerful PowerPoint For Educators

Ex er cises to Try
Figure 4.7. Slides for a Sim ple Quiz in the Chap ter 4 Ex ercise
Ä
Create a small mul tiple-choice quiz in PowerPoint. In clude a ti -
tle slide and two question slides with two an swers for each ques -
tion: one cor rect and one in correct. The ques tions should be in a
text ob ject or the ti tle area of a ti tle only slide. The an swers
should be but tons.
Ä
Use Add Text to add the text for the cor rect and in correct an -
swers to each question.
Ä
Put a button on each slide to advance to the next slide.
Ä
Put a but ton on the last slide to re turn to the ti tle slide.
Ä
Write a VBA script that is iden tical to 
RightAnswer'>SayHello
, ex cept name it
RightAnswer
. Replace the text “Hello” with the text “Good job.”
Ä
Write an other VBA script that is iden tical to 
SayHello
, ex cept
name it
WrongAnswer
. Replace the text “Hello” with the text
“Try to do better next time.”
Ä
Link your answer but tons to the
RightAnswer
and 
WrongAnswer
scripts.
Ä
Save your file and run it in Slide Show View.
Ä
Add a password to protect the VBA from be ing seen.
48 Getting Started with VBA


5
Let’s Get Script ing
In tro duc tion
In Chapter 4 you learned how to ac cess the VBA Ed itor and write a simple
script. In this chapter you will begin to learn a few more ba sic scripts, in cluding
some scripts that allow you to get in put from the user. In the pro cess, you will
learn a little bit about variables, which are used to store in formation, so you can
use it when you give feedback. What good would it be to ask for the user’s name,
if you don’t use it as part of the feedback? You will get a pre view of how to use
some of the same scripts to get other kinds of in put, such as answers to short-
answer questions. Fi nally, in this chap ter you will learn some details about run -
ning your scripts and associating them with buttons, including how to associate a 
button with more than one script.

Download 1.37 Mb.

Do'stlaringiz bilan baham:
1   ...   38   39   40   41   42   43   44   45   ...   191




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling