Solved

Timer in power point

Posted on 2004-04-26
5
579 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will show you how to use shortcut menus in the Access run-time environment.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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: …

749 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