How to make a countdown timer in powerpoint using VBA

Ғылым және технология

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 KZread 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...

Пікірлер: 28

  • @karinaadcock
    @karinaadcock3 жыл бұрын

    Sub countdown() Dim future As Date future = DateAdd("n", 2, Now()) Do Until future DoEvents ActivePresentation.Slides(1).Shapes("rectangle").TextFrame.TextRange = Format(future - Now(), "nn:ss") Loop End Sub

  • @davidsanabria1404

    @davidsanabria1404

    2 жыл бұрын

    Hi Karina How can I put the timer on each slide? Copy-paste?

  • @chrisl6816

    @chrisl6816

    Жыл бұрын

    @Technical Toatkay did you ever figure this out? Currently trying to...

  • @felicious6384

    @felicious6384

    Жыл бұрын

    @@chrisl6816 Try to implement the countdown timer on the SlideMaster.

  • @janetmagday5469
    @janetmagday54695 ай бұрын

    Thank you so much!

  • @angthanhngoc9329
    @angthanhngoc932924 күн бұрын

    Thank for sharing

  • @bhatkiran7
    @bhatkiran7 Жыл бұрын

    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. 😘

  • @amiEliyahu
    @amiEliyahu2 жыл бұрын

    Brilliant

  • @andresf.martinezm601
    @andresf.martinezm601 Жыл бұрын

    Gracias por la enseñanza, gran saludo desde Colombia.🟡🔵🔴 🙅‍♂

  • @uselessgamer82
    @uselessgamer82 Жыл бұрын

    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?

  • @thequietroom3991
    @thequietroom399110 ай бұрын

    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.

  • @mathewstw8661
    @mathewstw86612 жыл бұрын

    How do I display GMT Time running live in PowerPoint Slide? Thank You in anticipation.

  • @vikashsamaga
    @vikashsamaga2 жыл бұрын

    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?

  • @karinaadcock

    @karinaadcock

    2 жыл бұрын

    Make sure you included "DoEvents" in your macro. DoEvents should allow you to still do other things while it is counting down.

  • @nanceeverdeen8075
    @nanceeverdeen807510 ай бұрын

    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 :)

  • @nanceeverdeen8075

    @nanceeverdeen8075

    10 ай бұрын

    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.

  • @inhgiahuy2926
    @inhgiahuy292610 ай бұрын

    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ị ạ

  • @TamimSultanT
    @TamimSultanT11 ай бұрын

    How to use it with a certain date?

  • @boyacosweep
    @boyacosweep Жыл бұрын

    Is there a way to use the timer without telling excel the number of the slide? My slide numbers constantly change.

  • @karinaadcock

    @karinaadcock

    Жыл бұрын

    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")

  • @felicious6384
    @felicious6384 Жыл бұрын

    Hi there, is it possible to implement that timer on the SlideMaster?

  • @felicious6384

    @felicious6384

    Жыл бұрын

    Welp, figured out how to use it on the SlideMaster, and it works pretty fine...just not during presentation mode. :/

  • @Melchi-shua...
    @Melchi-shua...3 ай бұрын

    how to create countup days on ppt?

  • @uweexter4917
    @uweexter4917 Жыл бұрын

    is there an easy trick to count up the seconds and minutes instead of counting down ??

  • @karinaadcock

    @karinaadcock

    Жыл бұрын

    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 DoEvents ActivePresentation.Slides(1).Shapes("rectangle").TextFrame.TextRange = Format(Now() - start, "nn:ss") Loop End Sub

  • @kimlade-nu4yc
    @kimlade-nu4yc3 ай бұрын

    how to add miliseconds???

  • @khaledserwy8533
    @khaledserwy8533 Жыл бұрын

    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

  • @chisenvan4242
    @chisenvan4242Ай бұрын

    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?

Келесі