Solved

Timer in power point

Posted on 2004-04-26
5
575 Views
Last Modified: 2012-05-07
Hi to all,
  Can anyone show me how to put a timer in your powerpoint presentation, which will run and displayed the time the slide is being shown and continously updating until we move to the next slide. The timer will start when a slide is being shown and stop when move to the next slide.

Thanks.

0
Comment
Question by:sharfaa
  • 2
  • 2
5 Comments
 
LVL 27

Expert Comment

by:jjafferr
ID: 10916825
Hi sharfaa,

Go to the Slide Sorter View (the button with 4 square)
Select 1 OR all Slides depending on what you want to do,
Right Click on a slide > Slide Transition, a popup will show,
Unselect "On mouse click",
Put the number of Seconds (5 for 5 seconds) in the "Automatically After",
Apply To All.

Hope this helps

Jaffer
0
 

Author Comment

by:sharfaa
ID: 10917182
No this is not what I want. The user should see the elasped time as well as the audience- To know if the targeted presentaion time will be met.
0
 
LVL 24

Expert Comment

by:R_Rajesh
ID: 10917910
hi sharfaa,

open a new presentation, the default layout should have two text boxes (for title and subtitle)
select "control toolbox" form the view - toolbars submenu. Add a commandbutton the the slide, set its caption to "Start Timer".
Double click the commandbutton, this should open the vbe window with the click event displayed by default. Add the following code to it.

--------
Private Sub CommandButton1_Click()
If Not tRunning Then
tprocID = SetTimer(0, 0, 1000, AddressOf TimerProc): tRunning = True
CommandButton1.Caption = "Stop Timer"
Else
tprocID = KillTimer(0, tprocID): tRunning = False
CommandButton1.Caption = "Start Timer"
End If
End Sub
---------

select module from the insert menu and paste the following code.

-----------------------
Option Explicit
Declare Function SetTimer Lib "user32" _
(ByVal hwnd As Long, ByVal nIDEvent As Long, _
ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, _
ByVal nIDEvent As Long) As Long
Public tprocID As Long, tRunning As Boolean

Sub TimerProc(ByVal hwnd As Long, ByVal uMsg As Long, _
ByVal idEvent As Long, ByVal dwTime As Long)
Static tElapsed As Integer
tElapsed = tElapsed + 1
ActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange.Text = tElapsed
End Sub
-------------------------

start the slideshow and click on the commandbutton you should see the timer begin, click the button again to stop the timer. Before exiting the slideshow make sure the timer is stopped.

Rajesh
0
 

Author Comment

by:sharfaa
ID: 10920545
Hi Rajesh
    Thanks once more for your answer. I 'm testing your code, will give you a feedback as soon as possible.
Bye Take care.
0
 
LVL 24

Accepted Solution

by:
R_Rajesh earned 250 total points
ID: 10921891
to have the timer display on each slide, showing how long the current lide has been displayed make the following modification to the timerproc sub. ofcourse shape 2 on each slide should be a textbox.

Sub TimerProc(ByVal hwnd As Long, ByVal uMsg As Long, _
ByVal idEvent As Long, ByVal dwTime As Long)
On Error GoTo errHndlr
Static sIndex
Static tElapsed As Integer
If sIndex <> SlideShowWindows(1).View.Slide.SlideIndex Then
tElapsed = 0
sIndex = SlideShowWindows(1).View.Slide.SlideIndex
End If
tElapsed = tElapsed + 1
ActivePresentation.Slides(SlideShowWindows(1).View.Slide.SlideIndex).Shapes(2).TextFrame.TextRange.Text = tElapsed
Exit Sub
errHndlr:
tprocID = KillTimer(0, tprocID): tRunning = False
End Sub

Rajesh
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Some time ago I was asked to create a VBA function that would calculate a check digit for an input number, using the following procedure: First, sum up all the individual digits in the number If that sum value has more than one digit, then sum up …
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now