title: Value out of range error, vba ppt
body: <p>I'm making a loop presentation in PowerPoint and I need a countdown to a specific date.</p>
  
  <p>When using the code below i get following error:</p>
  
  <p>Run-time error '-2147024809 (80070057)':
  The specified value is out of range.</p>
  
  <pre><code>Sub Countdown()
  Dim thedate As Date
  Dim daycount As Long
  Dim Icount As Integer
  Icount = ActivePresentation.Slides(1).Shapes.Count - 1
  thedate = "25/12/2013"
  daycount = DateDiff("d", Now, thedate)
  Select Case daycount
      Case Is &gt; 1
          ActivePresentation.Slides(1).Shapes(Icount) _
          .TextFrame.TextRange = daycount &amp; " Days to go!"
      Case Is = 1
          ActivePresentation.Slides(1).Shapes(Icount) _
          .TextFrame.TextRange = daycount &amp; " Day to go!"
      Case Else
          ActivePresentation.Slides(1).Shapes(Icount) _
          .TextFrame.TextRange = "It's here!"
  End Select
  End Sub
  </code></pre>
  
  <p>Please help me!</p>