PowerPoint vba to insert name on Quiz Certificate in PowerPoint

Joined
Oct 14, 2014
Messages
1
Reaction score
0
Hi all
I have written some very, very basic vba code to create an e-learning quiz but need to print a certificate on which the name of the pupil is inserted automatically and I haven't a clue on how to do this. Any help would be greatly appreciated, please. I have attached the code as far as I have got which works fine (at the moment). I can use Windows 7 or XP and PowerPoint 2007 or 2010 (depends where I am art the time

Dim UserName As String
Dim NumberCorrect As Integer
Dim numberWrong As Integer

Sub Initialise()
NumberCorrect = 0
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub YourName()
UserName = InputBox(Prompt:="Pleae type your first name!")
MsgBox " Welcome to The Wolverhampton Induction Quiz " + UserName, vbApplicationModal, " Trial Quiz"
End Sub

Sub Correct()
MsgBox "Well Done! That's the correct answer " + UserName, vbApplicationModal, " Trial Quiz"
NumberCorrect = NumberCorrect + 1
ActivePresentation.SlideShowWindow.View.Next
End Sub

Sub Wrong()
MsgBox "Sorry! That's incorrect " + UserName, vbApplicationModal, " Trial Quiz"
numberWrong = numberWrong + 1
ActivePresentation.SlideShowWindow.View.Next
End Sub

Sub Start()
NumberCorrect = 0
numberWrong = 0
YourName
ActivePresentation.SlideShowWindow.View.Next
End Sub

Sub Results()
MsgBox "Well done " & UserName & " You scored " & NumberCorrect & " out of " & NumberCorrect + numberWrong, vbApplicationModal, " Trial Quiz"
End Sub

Thanking you in anticipation
Regards:)
Gabrielle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top