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
Before you can run VBA code, you need to set PowerPoint’s security options to permit macros to run.
Click the Office button -> PowerPoint options.
On the left of the PowerPoint Options dialog box, Click Trust Center, then click Trust Center Settings on right.
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
In the VBA editor, Choose Insert -> Module, and then insert a code module for feedback to wrong&right answers.
Customize feedback to wrong answers:
In the big blank space on the right, type the following 3 lines:
MsgBox (“Sorry, that’s not right. Please try again.”)
Customize feedback to right answers:
MsgBox (“That’s right! You are so smart!”)
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.
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
From the Insert menu, click Autoshapes -> Action Buttons. Then choose the blank action button.
Resize and position the button on the slide.
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
Right click on the button, select Hyperlink. The Action Settings dialog box will appear.
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.
4. Duplicate the slide to as many as 10 slides.
Duplicate the slide and substituent the questions and answers to other questions.
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 VBZ via PowerPoint, you also can make more interactive Flash quiz for your PowerPoint presentation with 3rd party Flah quiz maker that can generate stand-alone Flash quiz. Wondershare Quiz Creator is such a Flash quiz maker to help educators create multimedia Flash quizzes for teaching.