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


Download 1.37 Mb.
Pdf ko'rish
bet95/191
Sana08.05.2023
Hajmi1.37 Mb.
#1442581
1   ...   91   92   93   94   95   96   97   98   ...   191
Bog'liq
2.2. Powerful PowerPoint For Educators

tial 
ize
they are in itialized (set to 
False
be cause none of the
questions have been an swered yet):
q1Answered = False
q2Answered = False
Remember that if you have more questions, you need to re peat both of these sets
of statements for each additional variable.
Next, we need our specialized
RightAnswer
and 
WrongAnswer
pro ce-
dures.
RightAnswer1
is tied to the right answer but 
ton for question 1.
WrongAnswer1
is tied to the wrong answer but 
ton(s) for question 1.
RightAnswer2
and 
WrongAnswer2
are for question 2. And, if we had more
ques tions,
RightAnswer3
and 
WrongAnswer3
would be for question 3;
RightAnswer4
and 
WrongAnswer4
would be for question 4; etc.
These pro cedures simply check the ap propriate vari able to see if the ques-
tion has been answered. If it hasn’t (
If q1Answered = False Then
), we up -
date the score (
numCorrect = numCorrect + 1
or 
numIncorrect =
numIncorrect + 1
). Regardless of whether or not it has been an swered be-
fore, we set the variable to
True
(e.g.,
q1Answered = True
for question 1) and
give the ap pro pri ate feed back (call ing 
DoingWell
or 
DoingPoorly
).
Short-Answer Quiz Questions
The above examples can be ex tended very easily to in clude short-answer ques-
tions. If we were to add a third ques tion that was short an swer, we would first need
the variable
q3Answered
, just like 
q1Answered
and 
q2Answered
, de clared with
a
Dim
state ment and in itialized in the 

Download 1.37 Mb.

Do'stlaringiz bilan baham:
1   ...   91   92   93   94   95   96   97   98   ...   191




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