MS Office Programming tricks Visual Basic

Create a Quiz Using Microsoft PowerPoint

MS PowerPoint is a very powerful office tool for creating outstanding presentations. I consider this as the most user friendly tool for creating beautiful charts and graphs within a short time. You will be even surprised to know that you can also use PowerPoint as a quiz maker. Today we will see how to create beautiful quizzes using PowerPoint.

All people know the traditional uses of PowerPoint. But now we will cross the boundary and see what else we can do with PowerPoint.

Recipe for creating a quiz using PowerPoint

We have created a handy interface using PowerPoint and VBA to frame questions and answers. There will be multiple slides where you can put your questions along with their possible options. At run time when a person will play the quiz, the questions will be fetched from the slides one by one and displayed on screen.

Start Quiz

  • To create a new question just copy-paste an existing slide. That means you have to make an exact replica of the slide. To do so just right click on the slide thumbnail present in left side of PowerPoint and click on Duplicate Slide.
  • In each slide you will find six text boxes. The first text box contains the question, the successive 4 boxes contain the options and the last box contains the answers.
  • You can provide multiple answers for a single question by separating the options by comma but remember never interchange the positions of any text boxes.
  • All slides where you set the questions are hidden. You can ensure their visibility by right clicking on the slide thumbnails on left hand side of PowerPoint.
  • While distributing the quiz just save the PowerPoint as PowerPoint show so that nobody can see the answers directly.

Developer point of view (others may skip this section)

  • The entire GUI is handled by two user forms in VBA.
  • Press Alt+f11 to open visual basic editor
  • Double click userform1 to view the code behind it
  • At run time, when you advance through the questions, VBA fetches the questions from the text boxes present in the slides.
  • When you press the submit button, it is first evaluated whether user's answer is correct for the question and the result is stored in an array.
  • Finally all the results are collected from the array and displayed on final result screen.

Leave a Reply

Your email address will not be published. Required fields are marked *