Make PPT Quiz Game Report Card - percentages, no. of correct answers | PPT VBA Macro Tutorial

  Рет қаралды 20,715

Bhavesh Shaha - PowerPoint Games

Bhavesh Shaha - PowerPoint Games

5 жыл бұрын

Download code: pptvba.com/quiz-game-percentage/
Download file: pptvba.com/quiz-game-percentage/
================
In this Microsoft PowerPoint Tutorial, we will be using Visual Basic Coding (VBA Coding) and making an interactive quiz game which can be used by teachers and in online courses.
We will be making a scorecard/report card slide and showing the following:
1. The number of correct answers.
2. The number of wrong answers.
3. The number of questions passed.
4. The total number of questions.
5. Points
6. Percentages
Download PPTM file and code:
tutorials.bhaveshshaha.com/dow...
==========================================
Part 1:
I will be showing you how to make an interactive quiz game that can keep scores/points in PowerPoint using Visual Basic or VBA Code.
• How to make PowerPoint...
Part 2:
We will be adding labels for the number of correct and wrong answers, total and passed questions. We will also show the Points and Percentages scored.
We will also allow questions to be passed and for the user to retry the quiz game.
• Make PPT Quiz Game Rep...
Part 3:
We will be adding a certificate slide which contains the name and the location of the user. Then, we will be printing the certificate slide and the result slide and save it as a .PDF file.
• Print Certificate with...
==========================================
Be responsible for the next part, comment on any one of my videos for any suggestions that you might have!
Comment below if you have any doubts.
I also do freelancing and make custom powerpoint games and templates. Contact me for more information.
==========================================
CODE:
Sub Correct()
Points.Caption = (Points.Caption) + 10
CA.Caption = (CA.Caption) + 1
Output = MsgBox("Your Answer is correct, well done!", vbOKOnly, "Correct Answer")
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Wrong()
Points.Caption = (Points.Caption) - 5
WA.Caption = (WA.Caption) + 1
Output = MsgBox("Your Answer is wrong.", vbOKOnly, "Incorrect Answer")
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Reset()
CA.Caption = 0
WA.Caption = 0
PQ.Caption = 0
TQ.Caption = 0
Points.Caption = 0
Percentages.Caption = 0
ActivePresentation.SlideShowWindow.View.Exit
End Sub
Sub CalculateResults()
TQ.Caption = 6
PQ.Caption = (TQ.Caption) - (CA.Caption) - (WA.Caption)
Percentages.Caption = (CA.Caption) * 100 / (TQ.Caption)
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Retry()
CA.Caption = 0
WA.Caption = 0
PQ.Caption = 0
TQ.Caption = 0
Points.Caption = 0
Percentages.Caption = 0
ActivePresentation.SlideShowWindow.View.GotoSlide (1)
End Sub
==========================================
Bhavesh Shaha,
2002bhavesh@gmail.com
/ bhaveshshaha
basicallybhavesh

Пікірлер: 64
@LearnerCB246
@LearnerCB246 Жыл бұрын
My dear old friend, it is that time again where I can use your valued help and tutoring, I watched several of your last PPT tutorials, [Quiz] and as usual, the message you left behind was powerful.
@MarisolRamos-1971
@MarisolRamos-1971 5 жыл бұрын
Excelente gracias 😊
@pgurjar25
@pgurjar25 2 жыл бұрын
Thanks a lot sir , its made easy for me
@bibintharian4093
@bibintharian4093 4 жыл бұрын
Awesome tutorial.... You are great...
@PPTVBA
@PPTVBA 4 жыл бұрын
Thank you so much 😀
@larrybeach2894
@larrybeach2894 Жыл бұрын
OK, LOL I actually answered my own question. The VB code lets you know it is correct or wrong. So COOL!
@PPTVBA
@PPTVBA Жыл бұрын
Hi Larry! Glad that the tutorial helped out! You can also customise your MsgBox by using: Output = MsgBox("Your Answer is Correct!", vbInformation, "Correct Answer!") and Output = MsgBox("Your Answer is Wrong!", vbCritical, "Wrong Answer!") This will add an icon to your MsgBox along with the system sound effect!
@larrybeach2894
@larrybeach2894 Жыл бұрын
@@PPTVBA thank you, I will definitely use this.
@shasteeswaran
@shasteeswaran 5 жыл бұрын
Super dude.
@PPTVBA
@PPTVBA 5 жыл бұрын
Thank you xD
@meenapatel4579
@meenapatel4579 3 жыл бұрын
Nice superb
@oswaltt2546
@oswaltt2546 3 жыл бұрын
thank you so much
@TotuusEtsija
@TotuusEtsija 3 жыл бұрын
Great tutorial! :) Straight to the point, well presented, easy to follow. :) Can you please tell me: - Is it possible to have the quiz without the Message box appearing after CA or WA? Or maybe having an 'Error' & 'Info' box with according Windows sounds? - Or even better - to be able to have separate YES and NO slides instead (like what you had in your video from 2015)? - And/or to add sounds, when you click the correct answer? (I tried adding it in the "Action Settings", but then it just plays the sound and does not continue to the next slide.) - Is it possible to get the Report on the last slide, without needing to have a separate slide and clicking the button?
@PPTVBA
@PPTVBA 3 жыл бұрын
This is a wonderful comment! Thank you for the in-depth questions. 1. Yep! Instead of vbOkOnly in MsgBox, do try "vbInformation" or "vbCritical" to have the Window Default Sounds. 2. Definitely! We can also have the answer box turn green or red. I have a tutorial ready! I just need to publish an article on my website for the same and I can make the video public! 3. Yep! That video includes sound also! 4. In my newer tutorial, the 2020 edition if I may, I will be having a "next" button that would take me to the next slide. They can click on different answer options but only the first click is recorded for the ending report. So, in that "next" button, we can code the "Show/Calculate result" sub-routine! Thank you!
@TotuusEtsija
@TotuusEtsija 3 жыл бұрын
@@PPTVBA Thank you for the reply! I really appreciate it! :) 1. I tried it - it works! :) 2. I also tried the version with regular YES & NO slides (2nd slide for WA, and a CA slide after each question) and adapted the code accordingly. I was sooo happy when it worked! :) But it does mess up the scoring, because after a WA, they can answer the same question again. Don't know hoe to fix that. Hope you can help with this as well - in a comment or in your next video. ;) 3. & 4. I will wait for your new video. :)
@PPTVBA
@PPTVBA 3 жыл бұрын
2. Yes! Instead of having a hyperlink that takes us to the last slide viewed, try this code: Sub nextslide() SlideShowWindows(1).View.GotoSlide (.LastSlideViewed.SlideIndex + 1) End sub
@robertnadeau1549
@robertnadeau1549 2 жыл бұрын
Great tutorial. Really got me on the right track. I do have a question. The label boxes in the SlideMaster. I can make then transparent in the slides but once the calculation takes place they become opaque again. Solutions?
@PPTVBA
@PPTVBA 2 жыл бұрын
Unfortunately, the transparency doesn't work as intended. If you can change the colour to that of the background, it would be the best way to proceed. Else, you can use normal shapes instead of ActiveX Elements. I'll upload a video on how to use normal shapes as counters tomorrow. Thank you!
@chillaxmusicplaylist
@chillaxmusicplaylist 5 жыл бұрын
Very nice tutorial... Can you add how to identify items with correct and wrong answers?
@PPTVBA
@PPTVBA 5 жыл бұрын
For this, we will need to have separate codes for every question. If we have 6 questions, we need 12 codes (6 for correct and 6 for wrong). This process becomes lengthy. I'll try to make a video on this or you can contact me at 2002bhavesh@gmail.com where I make these for a small fee.
@foztv7268
@foztv7268 4 жыл бұрын
Hi dear I want to do a quiz to 2 group, i want to know how can i the point total of each group?
@doverdragons5296
@doverdragons5296 4 жыл бұрын
Wow! Great tutorial love it, question how can I see if I would like to know which question were wrong? and also when i test the quiz at the end the results are duplicated there's two with Correct answers, two of wrong answers etc.. how can I fix that
@PPTVBA
@PPTVBA 4 жыл бұрын
I'll be make a tutorial where you can export a student report card to excel and see the questions which they answered incorrectly and which they answered correctly. Regarding the duplication of results, can you send me the file to my email? I'll take a look. bhavshaha@gmail.com
@cougar5285
@cougar5285 4 жыл бұрын
@@PPTVBA Thanks for the quick response I emailed you the file already.
@hemangianagha
@hemangianagha 4 жыл бұрын
Hi Bhavesh! these tutorials are really helpful! I worked on it, but, when I click Retry, the course does not jump to question 1 which in my case is slide 94. Can you help?
@PPTVBA
@PPTVBA 4 жыл бұрын
Can you show the code which is within the retry button?
@larrybeach2894
@larrybeach2894 Жыл бұрын
Another question, My slides are setup with 201 questions, with one incorrect slide, and a correct slide after each question. In your example I see you don't have any correct answer slides. Is there a better way of doing that instead of an additional 201?
@larrybeach2894
@larrybeach2894 Жыл бұрын
Question? When you go to Slide Master. and add all the things like the labels, and shapes etc. when I do it and close out the slide master. It makes all of my quiz question have the same design with the labels etc that I created on my congratulations slide. Is there a way to make it not change all of my slides?
@PPTVBA
@PPTVBA Жыл бұрын
Duplicate your slidemaster first and make the additions in the newly created slidemaster. If all the slides are changing even after this, select all the slides, go to layout > choose the blank layout of your original slidemaster.
@larrybeach2894
@larrybeach2894 Жыл бұрын
@@PPTVBA Thanks, I got it fixed.
@speedstartechnicalinstitut1055
@speedstartechnicalinstitut1055 4 жыл бұрын
Thanks. Nice. How to reset the file after attempt made by one student and another to start on the same file?
@PPTVBA
@PPTVBA 4 жыл бұрын
Just make all the label's captions to equal 0. I have shown a Sub Reset in the video if I remember correctly.
2 жыл бұрын
Hello, Thank you very much for the excellent tutorials. I'm creating a Quiz for my students and I was wondering if it's possible to automatically send students to a specific slide depending on the number of wrong answers? Something like this (I tried this but it didn't work): If WA.Caption = 2 Then ActivePresentation.SlideShowWindow.View.GotoSlide (5) Big thanks
@PPTVBA
@PPTVBA Жыл бұрын
Yes! You can! Your code is actually correct. I can have a look at it if you still need it. You can send it via email. Apologies for the late reply.
Жыл бұрын
@@PPTVBA Hello, my Quiz work fine now, thank you 👍
@minarnoajiprabowo7766
@minarnoajiprabowo7766 3 жыл бұрын
Why can't the macro-enabled show presentation run in another device especially when the file is downloaded from the internet?
@PPTVBA
@PPTVBA 3 жыл бұрын
You'll need to change the macro security settings. Go to develop >macro settings >enable. The person who downloads the file will also be given an option to enable macros the first time they open the file.
@vikkysiddiqui5820
@vikkysiddiqui5820 5 жыл бұрын
how to make the last slide to show ranks of persons who attempted the quiz,,,,plz reply if possible
@PPTVBA
@PPTVBA 5 жыл бұрын
This is possible. I'll make a video on it soon. Hopefully by the end of this month.
@bhattnirav322
@bhattnirav322 4 жыл бұрын
Dear Sir Pls reply I am not ble to run code ActivePresentation.SlideShowWindow.View.Next after clicking once on on answer. When i click on two different answers than i move to next slide
@PPTVBA
@PPTVBA 4 жыл бұрын
That could be because of the animations which you have in your slide. Try this code instead: With ActivePresentation.SlideShowWindow .View.GotoSlide (ActivePresentation.SlideShowWindow.View.Slide.SlideIndex + 1) End With
@anjurawat1420
@anjurawat1420 4 жыл бұрын
Thank you! But I am facing a problem. In my quiz, I followed all steps, but it is not showing calculated points
@anjurawat1420
@anjurawat1420 4 жыл бұрын
Please guide me in this case
@PPTVBA
@PPTVBA 4 жыл бұрын
Please download the template from my website and check whether that is working. Enable your macro security too.
@anjurawat1420
@anjurawat1420 4 жыл бұрын
@@PPTVBA ok
@samirakoubali7192
@samirakoubali7192 5 жыл бұрын
Very very nice tutorial...Thank you very much ; please how can me change the correct and wrong answers for arabic? i try it but not work
@PPTVBA
@PPTVBA 5 жыл бұрын
Do you have the correct font installed?
@samirakoubali7192
@samirakoubali7192 5 жыл бұрын
@@PPTVBA First thank you for the immediate answer I do not know ; witch font do you mean to install it ; please help me
@PPTVBA
@PPTVBA 5 жыл бұрын
@@samirakoubali7192 I am assuming that you want your questions and answers to be in Arabic. You would need to type in the Arabic text for that. Apologies if I have misunderstood your query.
@samirakoubali7192
@samirakoubali7192 5 жыл бұрын
@@PPTVBA thank you ; i typed the text in arabic on the slide it works but the feed back in the small window remains always in English and when I modified it it remains illegible: strange characters
@aravindakn6425
@aravindakn6425 3 жыл бұрын
WOW BUT WHEN IT IS SAVED POWER SHOW SCORE IS increasing
@saffrontequila5783
@saffrontequila5783 4 жыл бұрын
Thanks! Very informative :) How do we make it so that you can have unlimited attempts for each question? Thanks!
@PPTVBA
@PPTVBA 4 жыл бұрын
Yes, we can remove the message box and the gotonextslide line in the code of the wrong answer.
@adventurestar3519
@adventurestar3519 3 жыл бұрын
Hi, my ppt is running fine, but the calculation button and retry buttons are not working. I used codes from given links ..but not working . please help me
@PPTVBA
@PPTVBA 3 жыл бұрын
The most common cause of error would be that your Label Name and the Name mentioned in the codes might not be matching. They have to be case-sensitive. Feel free to download the free template from my website
@lyricsong9109
@lyricsong9109 4 жыл бұрын
I pasted the codes from your module and even tried to follow the steps from your video. The results are not being shown. :(
@PPTVBA
@PPTVBA 4 жыл бұрын
Can you download the free template which I have uploaded in my website? Please cross-check the name of the shapes and the name mentioned in the code. It has to be case-sensitive.
@gfsadsdf5795
@gfsadsdf5795 3 жыл бұрын
i think i know what it is. you may have not enabled macros. go to file, options, customise ribbon, and check developer. then, go to the developer tab where file, home, etc. are, and click macro security. tick 'enable all macros' and exit. hopefully this helps!
@PPTVBA
@PPTVBA 3 жыл бұрын
Also, @gf sadsdf can you please send the file to my email, in context to our email correspondence.
@bhattnirav322
@bhattnirav322 4 жыл бұрын
I am not able to move on next slide even after clicking once on correct or wrong answer. After clicking twice I am redirected
@PPTVBA
@PPTVBA 4 жыл бұрын
Try using View.GotoSlide(2) instead of .Next in the code.
@bhattnirav322
@bhattnirav322 4 жыл бұрын
As there is some animation in my slide i am not able to move to next slide..
@PPTVBA
@PPTVBA 4 жыл бұрын
@@bhattnirav322 Yes, that is why use GotoSlide(2) instead of Next.
@bhattnirav322
@bhattnirav322 4 жыл бұрын
Thanks for prompt reply. But after puting this code GoToslide(2) i am redirecting to the slide number 2 which is not my next question slide. I dont want that. After my first question slide next slide is the slide having options with highlighting the correct answer and then after next slide is my next question slide. Is there any way to run any macro only once? Like if i click on option correct then the Macro automatically get disabled for that particular question?
Print Certificate with student's NAME | Interactive Quiz Game: PPT VBA Macro Tutorial
20:39
Bhavesh Shaha - PowerPoint Games
Рет қаралды 15 М.
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 10 МЛН
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 21 МЛН
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 10 МЛН
Summer shower by Secret Vlog
00:17
Secret Vlog
Рет қаралды 13 МЛН
How to make PowerPoint Interactive Quiz Game | Points/Percentages/Score | PPT VBA Macro Tutorial
12:34
Make Animations in PowerPoint using VBA Codes and ChatGPT
6:10
The Teacher
Рет қаралды 12 М.
Automate PowerPoint Presentations with ChatGPT
4:54
Tech for Toastmasters
Рет қаралды 212 М.
Guess the Phrase (Wheel of Fortune) Classroom Quiz
17:44
The Tech Train
Рет қаралды 86 М.
How to Make Quiz in PowerPoint
18:20
Kevin Stratvert
Рет қаралды 220 М.
How to Make a Google Slides Interactive Quiz! *multiple choice*
8:04
Jeremy's Tutorials
Рет қаралды 59 М.
PowerPoint Quiz Game - Who Wants To Be a Millionaire - (Free Download PPT Template)
19:21
Bhavesh Shaha - PowerPoint Games
Рет қаралды 139 М.
How to create an interactive quiz in PowerPoint
23:54
The Tech Train
Рет қаралды 171 М.
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 10 МЛН