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
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