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


Download 1.37 Mb.
Pdf ko'rish
bet99/191
Sana08.05.2023
Hajmi1.37 Mb.
#1442581
1   ...   95   96   97   98   99   100   101   102   ...   191
Bog'liq
2.2. Powerful PowerPoint For Educators

WARNING!


Sub Question3()
Dim an 
swer
answer = InputBox(Prompt:="What is the cap 
ital of Mary 
land?", _
Ti 
tle:="Question 3")
answer = Trim(an 
swer)
answer = LCase(an 
swer)
If an 
swer = "annapolis" Or _
an 
swer = "anapolis" Or _
an 
swer = "annappolis" Or _
an 
swer = "anappolis" Then
RightAnswer3
Else
WrongAnswer3
End If
End Sub
The exact same pro cedures can be used for any short-answer question. Sim-
ply change the
InputBox
statement to in clude your question and change the
If
statement to in clude the correct an swer(s) for your question.
How Did You Do: Reporting Results to the Teacher
The previous ex amples con centrated on giv ing feedback to stu dents by tell-
ing them which ques tions they got right and wrong and what their score is at the
end. In this section, you will learn a trick to have your stu dents re port results to
you. One method of reporting that in formation is to create a results slide that can
be printed. We’ll extend the pre vious ex amples in two ways to do this:
1.
Instead of using a 
MsgBox
to announce the re sults, we will cre ate a
slide that announces the results. The slide will in clude a but ton for
print ing.
2.
We will not only keep track of right and wrong an swers but specifi-
cally what the an swer was that was typed. This will al low our re sults
page to print a list of an swers that were given.
The most significant changes to the code are related di rectly to our two ex -
ten sions:
1.
We will add the pro cedures

Download 1.37 Mb.

Do'stlaringiz bilan baham:
1   ...   95   96   97   98   99   100   101   102   ...   191




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