Hi John,
So i finally managed to get the code working and improvised for what I want it to do. Here's what I come up with finally.
Sub Tmr()
Dim TMinus As Integer
Dim xtime As Date
With ActivePresentation.Slides(5)
With .Shapes(1)
' Countdown in seconds
TMinus = 30
Do While (TMinus > -1)
' Suspend program execution for 1 second (1000 milliseconds)
Sleep 1000
xtime = Now
.TextFrame.TextRange.Text = Format(TimeValue(Format(Now, "hh:mm:ss")) _
- TimeSerial(Hour(Now), Minute(Now), Second(Now) + TMinus), "hh:mm:ss")
TMinus = TMinus - 1
' Very crucial else the display won't refresh itself
DoEvents
Loop
End With
End With
End Sub
This is now, as you will notice, a simpler version where a 30 second timer runs when the shape (enabled with the Tmr Macro) is clicked.
However, i now want the time to be displayed only in SECONDS (as opposed to hh:mm:ss and unfortunately due to my inexperience in VBA I am not aware of a function which can do that. I will greatly appreciate your help if you can advise.
The next step is to be able to stop this counter when I jump to another slide and then continue the timer counter from where I left it when I come back to the slide which contains the Timer Shape.
Any guidance will be greatly appreciated