Macroscript For Interactive Powerpoint
Macroscript For Interactive Powerpoint
Sub AddDropDownItems()
ComboBox1.AddItem "1"
ComboBox1.AddItem "2"
ComboBox1.AddItem "3"
ComboBox1.AddItem "4"
ComboBox1.ListRows = 4
End Sub
Sub Initialize()
numCorrect = 0
numIncorrect = 0
qAnswered = False
End Sub
Sub YourName()
userName = InputBox("Type your name")
End Sub
Sub RightAnswer()
If qAnswered = False Then
numCorrect = numCorrect + 1
End If
qAnswered = False
MsgBox "You are doing well, " & userName
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub WrongAnswer()
If qAnswered = False Then
numIncorrect = numIncorrect + 1
End If
qAnswered = True
MsgBox "Try to do better next time, " & userName
End Sub
Sub Feedback()
MsgBox "You got " & numCorrect & " out of " _
& numCorrect + numIncorrect & ", " & userName
SaveToExcel 'ADDED
End Sub