Originally Posted by
John Wilson
Formatting a DATE returns a String so RDate should be declared as a string
I made major changes and just about everything is working fine, except the below items ARE NOT showing on my blank form slide 42 - username, date, and percentage score.
The Sub Cert() is suppose to insert, the [username, date, and percentage score] onto a certificate I created on slide 42 if the person taking the quiz scores 70 or more .
Private Sub APA()
Dim Username As Integer
Dim Rdate As StringRdate = Date
Rdate = Format((Date), "mmmm dd, yyyy")
Rdate.Caption = Format((Date), "mmmm dd, yyyy")
CorrectAnswer.Caption = 0
IncorrectAnswer.Caption = 0
Ppercentage.Caption = 0
Npercentage.Caption = 0
End Sub
Sub Reset()
CorrectAnswer.Caption = 0
IncorrectAnswer.Caption = 0
Ppercentage.Caption = 0
Npercentage.Caption = 0
'Rdate.Caption = Format((Date), "mmmm dd, yyyy")
ActivePresentation.SlideShowWindow.View.Exit
End Sub
Sub Startover()
CorrectAnswer.Caption = 0
IncorrectAnswer.Caption = 0
Ppercentage.Caption = 0
Npercentage.Caption = 0
'Rdate.Caption = Format((Date), "mmmm dd, yyyy")
ActivePresentation.SlideShowWindow.View.GotoSlide 1
End Sub
Sub TakeQuiz()
Username = InputBox(Prompt:="Type Your Name! ")
MsgBox "Welcome to the Academic Online Tutorial Quiz " + Username, vbApplicationModal, "Academic Online Tutorial Quiz"
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Correct()
CorrectAnswer.Caption = (CorrectAnswer.Caption) + 1
Ppercentage.Caption = (CorrectAnswer.Caption) * 20
Output = MsgBox("Your Answer is correct, well done! " + Ppercentage + " %", vbOKOnly, "Correct Answer")
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Wrong()
IncorrectAnswer.Caption = (IncorrectAnswer.Caption) + 1
Npercentage.Caption = (IncorrectAnswer.Caption) * (-20)
Output = MsgBox("Your Answer is incorrect. " + Npercentage + " %", vbOKOnly, "Incorrect Answer")
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub Rexit()
CorrectAnswer.Caption = 0
IncorrectAnswer.Caption = 0
Ppercentage.Caption = 0
Npercentage.Caption = 0
'Rdate.Caption = Format((Date), "mmmm dd, yyyy")
ActivePresentation.SlideShowWindow.View.Exit
End Sub
Sub Retry()
CorrectAnswer.Caption = 0
IncorrectAnswer.Caption = 0
Ppercentage.Caption = 0
Npercentage.Caption = 0
'Rdate.Caption = Format((Date), "mmmm dd, yyyy")
ActivePresentation.SlideShowWindow.View.GotoSlide (1)
End Sub
Sub Cert()
If Ppercentage.Caption >= 80 Then
ActivePresentation.SlideShowWindow.View.GotoSlide (9)
Username = (Username.Caption)
Rdate.Caption = Format((Date), "mmmm dd, yyyy")
Ppercentage.Caption = (Ppercentage.Caption)
End If 'Ppercentage <= 69
Else
ActivePresentation.SlideShowWindow.View.Quit
End Sub