PDA

View Full Version : Live Clock On text box



Steve345
09-12-2020, 05:12 AM
Hi Everyone,

Hope someone can help me on this.

I would like a live clock on a Textbox or a shape but not having any luck at the moment.

Got the following code below to work but its appearing on the first slide only. Need it to be flexible and move to any slide on the textbox. Please help :(


Sub digitalClock()

Dim time As Date
Dim minutes As Integer


time = Now()
minutes = 60


time = DateAdd("n", minutes, time)


Do Until Now() = time
DoEvents


With ActivePresentation.Slides(1).Shapes(1).TextFrame.TextRange
.Text = Format(Now(), "hh:mm:ss")
End With


Loop


End Sub

Fred.Peters
10-21-2020, 05:02 AM
Just a thought. Put on slide master and set visible to false. put a discrete button to change visible to true. then on slide change set visible to false. Just a concept. the code is yours to deal with. Sorry.