I'm making a loop presentation in PowerPoint and I need a countdown to a specific date.
When using the code below i get following error:
Run-time error '-2147024809 (80070057)': The specified value is out of range.
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 > 1
ActivePresentation.Slides(1).Shapes(Icount) _
.TextFrame.TextRange = daycount & " Days to go!"
Case Is = 1
ActivePresentation.Slides(1).Shapes(Icount) _
.TextFrame.TextRange = daycount & " Day to go!"
Case Else
ActivePresentation.Slides(1).Shapes(Icount) _
.TextFrame.TextRange = "It's here!"
End Select
End Sub
Please help me!