How to make a Score / Point Counter in PowerPoint VBA
In this tutorial, we will make a Counter in PowerPoint using Visual Basic Code. This PPT counter will be controlled by two buttons which will either increase or decrease the value by 1.
We can use this basic counter to make quiz games, scoreboards and to keep scores in PowerPoint Games and other classroom, indoor or outdoor activities.
- Add a label whose caption is 0
- Write two macros, one which adds 1 to the label and the other which subtracts 1 from the label.
- Insert the suitable macros to the corresponding shape or button in your PowerPoint presentation.
- Add a reset/exit button which changes the label to 0.
1. Enabling the Developer Tab
The first thing which we have to do is to enable the Developer Tab which is hidden by default in PowerPoint.
This will allow us to use Macros (VBA) and other add-ons.
1. Click on the Microsoft icon at the top-left corner.
2. Click on “PowerPoint Options” which is present at the bottom.
3. In the new pop-up window, select the “Popular” tab.
4. Check mark the “Show Developer Tab in the Ribbon”and then click “OK”.
1. Click on “File”.
2. Then click “Options”.
3. In the new pop-up window, select the “Customize Ribbon” tab.
4. Under Customize the Ribbon, check mark the “Developer” and then click “OK”.
2. Add labels & shapes for PPT Counter
From the developer tab, add a label to your slide and change its properties such that its name is counter and the caption is 0. Also, adjust the font and size accordingly.
Then, add 2 shapes which represent addition and subtraction of your points.
Finally, add a small oval shape in the corner of the slide which will reset the counter. You can also add another one to exit the slide-show presentation.
2. Coding in VBA Macro
Click on “View Code” which is present in your developer tab.
First, lets write a Visual Basic Code to increase (or) decrease the counter label’s caption by 1.
Now, write a code which will reset this counter by making it 0, and exit this PPT
3. Adding Macros for the PPT Counter
Click on the shape which you want to increase the counter. Then, go to the:
Insert Tab > Action > Mouse Click > Run Macro > Sub PlusOne()
Similarly, do the same with the corresponding shapes and the macros.
Your PowerPoint Counter for Scores and Points is ready.
4. Saving the PowerPoint Counter
While saving your file, make sure that the file type is:
PowerPoint Macro Enabled Presentation (.pptm)
If you want it to open directly in Slide-Show mode, you can save it in .ppsm format.
Download this PowerPoint Counter template (with codes)
Frequently Asked Questions:
1. How do I make the counter + or – 100?
Just replace the value present in the code.
2. How to add a sound effect?
You can have background music in PowerPoint by just dragging the audio file in the first slide. You can change the audio settings so that it plays throughout the presentation. You can also add a sound effect on the click of a button by going to Action > Mouse Click > Play Sound
3. How do I make it for more than one counter?
You can refer to this tutorial.
4. How can I have this counter in all the slides?
Just make this in a slidemaster layout (View > Slide Master)
5. The number is not crossing 10. What do I do?
Your box might be too small or your font size must be too large. Fixing that will make it work.