Solved

Timer in power point

Posted on 2004-04-26
5
578 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had the experience that you had to follow 10 steps over and over again every time when you need to nicely forward an important email to your manager? Fear no more! With the help of the Quick Steps feature in Outlook 2010, your old chor…
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

856 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