Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Microsoft PowerPoint _ Using Vba To Create A Timer On A Slide

Posted by: Psycoperl Sep 30 2019, 06:29 AM

I am working on a presentation in PowerPoint and at certain points of the presentation there are planned breaks for either team collabs or rest/comfort. Instead of having to build many slides which document the time remaining, I was hoping that I could use VBA to control the content displayed on the slide. Is this possible and how can I do this?
This is going to be my first VBA attempt in PowerPoint, normally I stay to MSAccess.

Posted by: kfield7 Sep 30 2019, 07:48 AM

See if this helps. It's a timer that pauses a number of seconds.
You could also use the timer just to count time.

CODE
Function kPause(kSeconds As Single) As Single
Dim kStart As Single
kStart = Timer
Do While Timer < kStart + kSeconds
    DoEvents
Loop
kPause = Timer - kStart
End Function

Posted by: arnelgp Sep 30 2019, 08:37 AM

you can press S to pause the presentation.
spacebar to continue.

keyboard shortcut while presentation is running:

End slide show: ESC
toggle screen black: B
toggle screen white: W
pause show: S
resume show: spacebar
show/hide pointer: A

Posted by: ADezii Sep 30 2019, 12:45 PM

Here is a small Demo that I created for will that will display a Time Remaining Value in a Text Box on Slide# 3. Simply Click on the Countdown Timer Button on Slide# 3 or the Cancel Command Button. Moving to another Slide while the Countdown is active will disable the Countdown sequence. Download it and give it a try. I have also attached a Graphic of Slide# 3 for illustration purposes.


 

 Slide_Timer.zip ( 833.87K ): 4
 

Posted by: arnelgp Sep 30 2019, 02:17 PM

can you make it only Any slide, you don't
know which slide is on the show when breaks begins.
can the timer be changed, so as to wait for others
taking longer break,

Posted by: ADezii Oct 1 2019, 07:08 AM

QUOTE
can you make it only Any slide, you don't
know which slide is on the show when breaks begins.

Create a Macro in All open presentations and call it within any Slide via Application.Run "<Macro Name>"
QUOTE
can the timer be changed, so as to wait for others
taking longer break,

Yes, if you need this flexibility, then you can prompt for a duration Value within the Macro.