Thread: VBA formula
View Single Post
 
Old 07-21-2023, 08:54 AM
jkidwell jkidwell is offline Windows 10 Office 2021
Novice
 
Join Date: Jul 2023
Posts: 1
jkidwell is on a distinguished road
Default VBA formula

Hello, I have this formula for a countdown type clock (counting down to a certain date). I can get it to work and countdown, but would like to adjust the display.
(for example - 5 weeks, 16 days, 7 minutes, 45 seconds remaining.
so right now it shows
5 Weeks 16:07:45

But I would like it to displa:
5 Weeks 16 Hours 7 Minutes 45 Seconds

here is the formula I am using- I just do not have enough VBA experience to update the formula and get my commas, parenthesis, etc in the correct space.

ActivePresentation.Slides(1).Shapes("Countdown").T extFrame.TextRange = DateDiff("ww", Now(), time) & " Weeks " & Format((time - Now()), "hh:mm:ss")

Thank you for any help you can offer!
Jennifer
Reply With Quote