How to make a countdown timer in powerpoint using VBA
HTML-код
- Опубликовано: 7 авг 2024
- Sub countdown()
Dim future As Date
future = DateAdd("n", 2, Now())
Do Until future less than symbol Now()
DoEvents
ActivePresentation.Slides(1).Shapes("rectangle").TextFrame.TextRange = Format(future - Now(), "nn:ss")
Loop
End Sub
The less than symbol is not allowed in a RUclips description
--------------------------------------------------------------------------------
#powerpoint #powerpointtutorials
SUBSCRIBE: goo.gl/c46YPs
Microsoft Office 365, Beta Channel, Version 2107
---------------------------------------------------------------------------------
IF YOU LIKED THIS VIDEO YOU MAY ALSO LIKE:
- How to make a countdown timer in powerpoint • How to make a countdow...
- 30 second countdown timer in PowerPoint • 30 second countdown ti...
- How to make a sand timer animation in powerpoint • How to make a sand tim... Наука
Sub countdown()
Dim future As Date
future = DateAdd("n", 2, Now())
Do Until future < Now()
DoEvents
ActivePresentation.Slides(1).Shapes("rectangle").TextFrame.TextRange = Format(future - Now(), "nn:ss")
Loop
End Sub
Hi Karina
How can I put the timer on each slide?
Copy-paste?
@Technical Toatkay did you ever figure this out? Currently trying to...
@@chrisl6816 Try to implement the countdown timer on the SlideMaster.
Thank you so much!
Lovely video. Hourse of search and finally I got the best countdown timer VBA. Thanks for keeping it explanative and simple. A great help to me. 😘
How about once I move onto a different slide, the countdown macro is still running. How can I stop it if the slide has changed?
Gracias por la enseñanza, gran saludo desde Colombia.🟡🔵🔴 🙅♂
Thank for sharing
Brilliant
Hi, love this very easy to understand tutorial, please may i ask - if i want the ticker to count down seconds until say 30th September 2023, what do i change, cant work out how to get an actual date into the box.
How do I display GMT Time running live in PowerPoint Slide?
Thank You in anticipation.
Hi, thank you for the great video! I have one question - when the timer is counting down, the rest of the PowerPoint seems to come to a standstill, i.e. I'm not able to go to the next slide or click on any other buttons on the slide until the countdown has finished. Do you know how to avoid this issue?
Make sure you included "DoEvents" in your macro. DoEvents should allow you to still do other things while it is counting down.
Hello, Thank you so much for your VDO. It was awesome, finally something not Add-ins or thousands of objects with animations.
By the way, I can't link action to the macro. The "Run macro" option is not selectable for me. I changed settings in the Trust Center to enable all macros and restarted PPT and the laptop already. Do you know how I can fix this? TIA :)
fixed now, thank you :)
I don't even know where the problem is... I closed and opened the PPT again, the code was gone. Even though I made sure I saved it together with the code.
em muốn gán âm thanh vào, đến khi đếm ngược kết thúc thì phát âm thanh lên ạ. cảm ơn chị ạ
How to use it with a certain date?
Is there a way to use the timer without telling excel the number of the slide? My slide numbers constantly change.
Would need to use VBA to change the slide name:
Changing slide name:
Sub changeSlideName()
ActiveWindow.View.Slide.Name = "new_slide_name"
End Sub
Check slide name has changed:
Sub getSlideName()
MsgBox "Slide name is " & ActiveWindow.View.Slide.Name
End Sub
New code:
ActivePresentation.Slides("new_slide_name").Shapes("rectangle").TextFrame.TextRange = Format(future - Now(), "nn:ss")
Hi there, is it possible to implement that timer on the SlideMaster?
Welp, figured out how to use it on the SlideMaster, and it works pretty fine...just not during presentation mode. :/
how to create countup days on ppt?
how to add miliseconds???
is there an easy trick to count up the seconds and minutes instead of counting down ??
You could use code like this. We create an extra variable called start and then get further and further away from the start time until we reach the future time.
Sub countdown()
Dim start As Date
Dim future As Date
start = Now()
future = DateAdd("s", 10, Now())
Do Until future < Now()
DoEvents
ActivePresentation.Slides(1).Shapes("rectangle").TextFrame.TextRange = Format(Now() - start, "nn:ss")
Loop
End Sub
Dear Karina
I need your help
I have a consultation in making a countdown to more than one shape in one side and I want to make it work at the same time, do you have an email or any other means of communication that I can send you the file
Kind Regards
How about once I move onto a different slide, the countdown macro is still running. How can I stop it if the slide has changed?