W
Wallacethegreat
Hi All,
Some help is needed please as I have created a powerpoint presentation which
includes a quiz. I have created a macro that asks for your name and once it
has been entered it will then add up your score.
Problem is that the score doesn't reset to 0 when a new name is input or if
you try the quiz again..
How can I get the score to reset to 0
I'll post the script I've created below
Sub yourname()
username = InputBox(prompt:="Please Enter Your Name", Title:="Input Name")
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Correct()
MsgBox ("Correct, " & username)
numcorrect = numcorrect + 1
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Wrong()
MsgBox ("Your Answer Is Wrong, " & username)
numincorrect = numincorrect + 1
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Feedback()
MsgBox ("Well, " & username & "," & Chr$(13) & " You got " & numcorrect & "
out of " & numcorrect + numincorrect)
End Sub
All suggestions gratefully received
Some help is needed please as I have created a powerpoint presentation which
includes a quiz. I have created a macro that asks for your name and once it
has been entered it will then add up your score.
Problem is that the score doesn't reset to 0 when a new name is input or if
you try the quiz again..
How can I get the score to reset to 0
I'll post the script I've created below
Sub yourname()
username = InputBox(prompt:="Please Enter Your Name", Title:="Input Name")
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Correct()
MsgBox ("Correct, " & username)
numcorrect = numcorrect + 1
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Wrong()
MsgBox ("Your Answer Is Wrong, " & username)
numincorrect = numincorrect + 1
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Feedback()
MsgBox ("Well, " & username & "," & Chr$(13) & " You got " & numcorrect & "
out of " & numcorrect + numincorrect)
End Sub
All suggestions gratefully received