PowerPoint for Educators: How to Make Multiple-choice Quizzes via VBA

PowerPoint is a multimedia courseware to create multimedia courses to enhance the classroom experience. Also, it is a great assessment tool to create quizzes. The VBA (Visual Basic for Applications) feature in PowerPoint gives educators an accessible way to easily create interactive multimedia quizzes. Here I will teach you how to create multiple-choice quizzes with VBA in PowerPoint with step-by-step illustrations.

Supposing you want to create a quiz with 10 multiple-choice questions and only one correct answer for each question. Take PowerPoint 2007 for example, here are the details.

Step 1 – New a blank presentation

Step 2 – Customize feedback to each question with macro

You may be confused with the first step because the first step in all of the related quiz tutorials online is creating questions and answers. In order to simplify the steps to create multiple-choice quizzes, in this tutorial, I bring forward the feedback customization.
1. Set security options
a. Before you can run VBA code, you need to set PowerPoint’s security options to permit macros to run.
b. Click the Office button -> PowerPoint options.
c. On the left of the PowerPoint Options dialog box, Click Trust Center, then click Trust Center Settings on right.

3851710309 f11ac1f2f9 PowerPoint for Educators: How to Make Multiple choice Quizzes via VBA

d. Click Macro Settings on the left of the dialog then choose Disable all macros with notification.

2. Start the VBA Editor
Please press Alt+F11 to start the VBA Editor.

3. Customize feedback to wrong answer and right answers
a. In the VBA editor, Choose Insert -> Module, and then insert a code module for feedback to wrong&right answers.
b. Customize feedback to wrong answers:
In the big blank space on the right, type the following 3 lines:

Sub Wrong()
MsgBox ("Sorry, that's not right. Please try again.")
End Sub

Customize feedback to right answers:
Sub Right()
MsgBox ("That's right! You are so smart!")
SlideShowWindows(1).View.Next
End Sub

This code for right answer is similar to the wrong answer, except for its “SlideShowWindows” line, which advances the quiz-taker to the next slide.

3851710311 63da6c16ff PowerPoint for Educators: How to Make Multiple choice Quizzes via VBA

4. Return to PowerPoint from the VBA Editor
Please press Alt+F11 to return to PowerPoint. Leave the Visual Basic Editor open in the background. In PowerPoint, save the presentation, this will save the new macros as well.

Step 3 – Create questions and answers

1. Create question slides
Within PowerPoint, start a new slide using the Title Only slide layout. Type the first question in the title-text placeholder.

2. Add multiple-choice answers
a. From the Insert menu, click Autoshapes -> Action Buttons. Then choose the blank action button.
b. Resize and position the button on the slide.
c. Right click on the button, choose Add Text from the subsequent menu, and type the first answer. Now select the button, copy and paste the button for the remaining answers you’ll need on the slide.

3. Add macro to answers
a. Right click on the button, select Hyperlink. The Action Settings dialog box will appear.
b. Choose the Mouse Click tab, and from the “Action on click” area, check the “Run macro” radio button and select “Wrong” macro from the drop-down list. Click OK. Repeat the same setting to other remaining answers.

3851710313 f0ddb6e5df m PowerPoint for Educators: How to Make Multiple choice Quizzes via VBA

4. Duplicate the slide to as many as 10 slides
a. Duplicate the slide and substituent the questions and answers to other questions.
b. Repeat this step 3 to the right answers for each question, and select “Right” macro from the drop-down list.

Step 4 – Save the quiz presentation

Press F5 to preview the quiz presentation and save it to PPSX format. Now everything is ok, you create a quiz PowerPoint slideshow successfully.

Besides creating quiz with VBA via PowerPoint, you also can make more interactive Flash quizzes for your PowerPoint presentation with 3rd party Flah quiz maker that can generate stand-alone Flash quiz. QuizCreator is such a Flash quiz maker to help educators create multimedia Flash quizzes for teaching.

share save 171 16 PowerPoint for Educators: How to Make Multiple choice Quizzes via VBA

Tags: , , , , ,

9 Responses to “PowerPoint for Educators: How to Make Multiple-choice Quizzes via VBA”

  1. [...] PowerPoint for Educators: How to Make Multiple-choice Quizzes via VBA – The VBA (Visual Basic for Applications) feature in PowerPoint gives educators an accessible way to easily create interactive multimedia quizzes. [...]

  2. Werner says:

    There is another way to do the same thing, which I prefer.

    I don’t like VBA code – since I have never learned how to write code and therefore find a way around it.

    For the multiple choice questions, I simply write the “You are correct” or “Sorry, try again” in text boxes, which I then give an entrance animation and under “timing” select “triggers” and then “Start effect on click of” and select the text box that corresponds with that answer from the drop down list.

    The down side to this is that you have to do it multiple times for each incorrect answer, but on the plus side: 1) You don’t need to know how to write VBA code
    2) You can link nice animations with it, or even sounds
    3) You could even use pictures of check marks and crosses instead of just saying, “That is correct”.

    My kids love these interactive multiple choice questions. I have a Smartboard, and I have 3 teams in the class. I randomly select 1 students from each group and then the possible answers appear in front of each of them. As they touch the answers they get immediate feedback about whether their answer is right or wrong. They only get one chance, so it’s a balance between thinking fast and getting the answer first and taking enough time to make sure they get it right.

    Sorry, I’m carrying on a bit.

    Hope it was useful.

  3. Patricia says:

    Hello. While searching the Net I found your web site. Interesting post. Thanks ! I will thank the person who told me to visit your blog.

  4. Fe says:

    Thank you for the information on how to create test using both VB and PowerPoint. This method will be of great help to us educators. God Bless you.

  5. [...] There are basically two ways for making a quiz in PowerPoint program: the first is to learn VBA programming and create the quiz in PowerPoint, and the second one is to set the internal links on buttons between slides to direct the audience [...]

  6. [...] There are basically two ways for making a quiz in PowerPoint program: the first is to learn VBA programming and create the quiz in PowerPoint, and the second one is to set the internal links on buttons between slides to direct the audience [...]

  7. Aname says:

    Thank you but i’m wondering if i can add counter which help me to no how many correct answers

  8. admin says:

    You can track the answers by sending the results to specified emails, or you can view the report on Quiz Management System comes with QuizCreator. Also, you may integrate your SCORM/AICC quizzes to LMS for easy management and tracking.

  9. admin says:

    About creating quiz in PowerPoint program, you may learn more in http://www.sameshow.com/quiz-creator/article/powerpoint-quiz-maker.html .

Leave a Reply