That is a great idea!
Unfortunately, I didn't get it to work. I've placed everything inside a Module like this:
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public restart As Boolean
Public Sub OnSlideShowPageChange(ByVal Wn As SlideShowWindow)
If Wn.View.CurrentShowPosition = _
Wn.Presentation.SlideShowSettings.StartingSlide Then
restart = True
End If
End Sub
Sub Tmr()
Dim startS As Integer
Dim startM As Integer
Dim textToShow As String
restart = False
'On Slide 1, Shape 1 is the textbox
With ActivePresentation.Slides(1)
With .Shapes(1)
.TextFrame.TextRange.Font.Color = RGB(0, 220, 0)
startS = Second(Time)
startM = Minute(Time)
Do While (True)
If restart Then
.TextFrame.TextRange.Font.Color = RGB(0, 220, 0)
startS = Second(Time)
startM = Minute(Time)
End If
' Suspend program execution for 1 second (1000 milliseconds)
Sleep 1000
textToShow = TimeSerial(Hour(Now), Minute(Now) - startM, Second(Now) - startS)
'Changes the colour on the timer from green to red after 5s
If Second(Now) - startS > 5 Then
.TextFrame.TextRange.Font.Color = RGB(240, 0, 0)
End If
.TextFrame.TextRange.Text = Right(textToShow, 5)
DoEvents
Loop
End With
End
End With
End Sub
And since I didn't get OnSlideBegin either, I placed a transparent button over the sheet. So I start the slideshow, click the button, timer starts and all, but when I use the arrow keys, nothing at all happens. It doesn't even get to the end of the slide. Do you have any idea what to change?
//Jenny