Results 1 to 8 of 8

Thread: Powerpoint Quiz VBA Error - 1 is not in the valid range of 1 to 0

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Powerpoint Quiz VBA Error - 1 is not in the valid range of 1 to 0

    Hi, I'm working on building a small quiz in Powerpoint 2007, using some code I found online (this is my first post so the site won't let me share links ).
    I'm trying to adapt it so that there are more questions, and more possible answers (16 questions, 4 answer choices), but it still re-uses the same slide for each question.
    This quiz is to go at the end of a training presentation, so slide numbers are much higher than just 1, 2 & 3.
    The problem I'm having is that the code simply doesn't work properly, whenever I try to run it I get the errors "Subscript is out of range" or "1 is not in the valid range of 1 to 0" and the debugger highlights this line:

    SlideShowWindows(1).Presentation.Slides("QSlide").Shapes("Question").TextFrame.TextRange.Text = Qs(QNo - 1)
    Can anybody explain to me what's wrong here? I've never used VBA before and thought it should be a simple case of changing a few values to increase the number of questions etc and redesign the slides. I'm happy to share the code or upload the file if that would help.

    Thanks in advance for any help offered.
    Last edited by Aussiebear; 02-18-2025 at 10:35 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •