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


Download 1.37 Mb.
Pdf ko'rish
bet142/191
Sana08.05.2023
Hajmi1.37 Mb.
#1442581
1   ...   138   139   140   141   142   143   144   145   ...   191
Bog'liq
2.2. Powerful PowerPoint For Educators

GetStarted
,
YourName
,
DoingWell
, and
DoingPoorly
procedures are the same ones we have used many times before.
We can also use the new 
RightAnswer
and 
WrongAnswer
pro cedures from the 
previous ex ample. However, these pro cedures will not be tied di rectly to but -
tons. Instead, for mul tiple-choice ques tions we will add two new pro cedures,
RightAnswerButton
and 
WrongAnswerButton
, that will be tied to the but -
tons with right and wrong an swers. Here are the new pro cedures, to gether with
the
Dim
state 
ments and a slightly mod 
ified
Ini 
tial 
ize
pro ce dure. Use
GetStarted
,
YourName
,
DoingWell
, and 
DoingPoorly
pro ce dures from
any earlier example, and use 
RightAnswer
and 
WrongAnswer
pro ce dures
from the previous ex ample (see page 136), along with the following:
Dim numCorrect As In 
teger
Dim numIncorrect As In 
teger
Dim userName As String
Dim qAnswered() As Boolean
Dim an 
swer() As String 'Ar 
ray to store an 
swers
Dim numQuestions As Long
Dim printableSlideNum As Long
Sub Ini 
tial 
ize()
Dim i As Long
numCorrect = 0
numIncorrect = 0
printableSlideNum = ActivePresentation.Slides.Count + 1
numQuestions = ActivePresentation.Slides.Count - 2
ReDim qAnswered(numQuestions)
ReDim an 
swer(numQuestions)
For i = 1 To numQuestions
qAnswered(i) = False

Download 1.37 Mb.

Do'stlaringiz bilan baham:
1   ...   138   139   140   141   142   143   144   145   ...   191




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