Powerpoint Quiz - Visual Basic Programming

  Howard's Way 05 Jun 13
Locked

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

Advertisement

This thread is now locked and can not be replied to.

Should I upgrade to Windows 10? 8 reasons why you should upgrade to Windows 10... and 2 why you…

We are being sold the ability to spend money we don't have. And we love it

IKinema aims to banish droopy shoulders and wonky spines in animated CG characters

How to use Apple Music in the UK: Complete guide to Apple Music's features

We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message