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 for your courses 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.
d. Click Macro Settings on the left of the dialog then choose Disable all macros with notification.
Start the VBA Editor Please press Alt+F11 to start the VBA Editor.
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 and 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.
- 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.
- 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.
- 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 makers 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.
Login to add comments on this post.