Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POWERPOINT - CREATING A TIMER

Status
Not open for further replies.

mvpdep

Programmer
Joined
Nov 11, 2005
Messages
21
Location
CA
Hi all, hope there is an answer. If someone can help or point to a workshop that would be great thanks.

Lets assume I have a basic slide and i want to create a timer within the presentation.

For example my slide has 10:00 on it and I want it to count down every second...so 9:59...9:58...9:57 etc. down to 0:00.

How can I do this. Through transitions? Does this mean I have to create 600 slides? Through VB

Can someone help please and thanks.

James
 



Hi,

In a userform, something like this...
Code:
Private Sub UserForm_Activate()
    Dim t As Date, nLim As Long, nDif As Long
    t = Timer
    nLim = t + 2 * 60
    Do
       nDif = CLng(Int(nLim - t))
       Label1.Caption = Int(nDif / 60) & ":" & Format(nDif Mod 60, "00")
       t = Timer
       DoEvents
    Loop Until t > nLim
    Me.Hide
End Sub


Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top