Sniper Elite 4 review: Headshotting Nazis has never felt so good
I have produce a number of interactive quizs in Powerpoint 2003 using Visual basic to do a number of function then giving the user a score out of a 100% at the end. What I want to do now is split the quiz into sub sections / topics and give a score for each one. Is this possible or is this a bridge too far with Powerpoint. Below is my current basic script
Public NumberCorrect As Integer Dim userName 'Public variables retain their value so they can be added to each time a macro is run. Sub Initialise() 'Sets the score to zero so it’s not added to the previous user’s total, and goes to the first question. NumberCorrect = 0 ActivePresentation.SlideShowWindow.View.Next End Sub Sub Correct() 'Adds one to the total correct and moves to the next slide NumberCorrect = NumberCorrect + 1 End Sub Sub Wrong() 'Takes away one to the total correct and moves to the next slide NumberCorrect = NumberCorrect - 1 End Sub Sub Display() 'Shows the result in a pop-up message box with some explanatory text percent = ((NumberCorrect / 91) * 100) percent = Round(percent, 0) MsgBox (userName & " got " & percent & " % correct") ActivePresentation.SlideShowWindow.View.Next End Sub Sub YourName() Dim done As Boolean done = False ActivePresentation.SlideShowWindow.View.Next While Not done userName = InputBox(prompt:="Type your name", _ Title:="Input Name") If userName = "" Then done = False Else done = True End If Wend ActivePresentation.SlideShowWindow.View.Next End Sub
This thread is now locked and can not be replied to.