Public clock As Boolean Public currenttime, currentday As String Sub Pause() Dim PauseTime, start PauseTime = 1 start = Timer Do While Timer < start + PauseTime DoEvents Loop End Sub Sub StartClock() clock = True Do Until clock = False On Error Resume Next currenttime = Format((Now()), "h:mm:ss AM/PM") 'to remove am/pm comment the following line out currenttime = Mid(currenttime, 1, Len(currenttime) - 3) ActivePresentation.Slides(SlideShowWindows(1).View.CurrentShowPosition).Shapes("shpClock").TextFrame.TextRange.Text = currenttime Pause Loop End Sub Sub OnSlideShowPageChange(ByVal objectWindow As SlideShowWindow) clock = False ActivePresentation.Slides(SlideShowWindows(1).View.CurrentShowPosition).Shapes("shpClock").TextFrame.TextRange.Text = "--:--:--" End Sub Sub OnSlideShowterminate() clock = False End SubMy issue is starting the clock. Here is the closest I've been able to get:
Sub OnSlideShowPageChange(ByVal Wn As SlideShowWindow) If Wn.View.CurrentShowPosition = 2 Then StartClock End If End SubMy problem is that using this code, I cannot advance to the next slide or close the slideshow. The code works great if I attach it to an action button but I want it totally automatic.
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.