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 Sub
My 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 Sub
My 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.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.