PowerPoint でループ プレゼンテーションを作成していますが、特定の日付までのカウントダウンが必要です。
以下のコードを使用すると、次のエラーが発生します。
実行時エラー '-2147024809 (80070057)': 指定された値が範囲外です。
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
私を助けてください!