Dim visited() As Boolean Dim numSlides As Long Dim numRead As Integer Dim numWanted As Integer Dim numCorrect As Integer Dim numIncorrect As Integer Dim username As String Dim qAnswered As Boolean Sub GetStarted() Initialize YourName HowMany RandomNext End Sub Sub Initialize() Randomize numCorrect = 0 numIncorrect = 0 qAnswered = False numRead = 0 numSlides = ActivePresentation.Slides.Count ReDim visited(numSlides) For i = 2 To numSlides - 1 visited(i) = False Next i End Sub Sub YourName() username = InputBox("What is your name?") End Sub Sub HowMany() done = False While Not done numWanted = InputBox("How many questions would you like?") If numWanted >= 1 And numWanted <= 10 Then done = True Else MsgBox ("Pick a number from 1 to 10") done = False End If Wend End Sub Sub RightAnswer() If qAnswered = False Then numCorrect = numCorrect + 1 End If qAnswered = False DoingWell visited(ActivePresentation.SlideShowWindow.View.Slide.SlideIndex) = True numRead = numRead + 1 RandomNext End Sub Sub WrongAnswer() If qAnswered = False Then numIncorrect = numIncorrect + 1 End If qAnswered = True DoingPoorly End Sub Sub DoingWell() MsgBox ("Good job, " & username & ".") End Sub Sub DoingPoorly() MsgBox ("Try again, " & username & ".") End Sub Sub RandomNext() Dim nextSlide As Long If numRead >= numWanted Or numRead >= numSlides - 2 Then ActivePresentation.SlideShowWindow.View.Last Else nextSlide = Int((numSlides - 2) * Rnd + 2) While visited(nextSlide) = True nextSlide = Int((numSlides - 2) * Rnd + 2) Wend ActivePresentation.SlideShowWindow.View.GotoSlide (nextSlide) End If End Sub Sub Feedback() MsgBox ("You got " & numCorrect & " out of " _ & numCorrect + numIncorrect & ", " & username) End Sub