Dim visited() As Boolean Dim numSlides As Long Dim numRead As Integer Dim numWanted As Integer Sub GetStarted() Initialize 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 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 'If you want it to ask you how many questions to answer (between 1 and 10), 'uncomment the lines above and comment the next line. If you want it to just 'go through all the questions, use the next line. numWanted = (numSlides - 2) / 2 End Sub Sub RandomNext() Dim nextSlide As Long If numRead >= numWanted Or numRead >= (numSlides - 2) / 2 Then ActivePresentation.SlideShowWindow.View.Last Else nextSlide = (Int(((numSlides - 2) / 2) * Rnd + 1)) * 2 While visited(nextSlide) = True nextSlide = (Int(((numSlides - 2) / 2) * Rnd + 1)) * 2 Wend visited(nextSlide) = True numRead = numRead + 1 ActivePresentation.SlideShowWindow.View.GotoSlide (nextSlide) End If End Sub