Solved

Timer in power point

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction It seems that at least a couple of times per month, I answer a question that requires automating Outlook from another Microsoft Office application, usually (although not always) to send one or more email messages.  For example: …
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
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 …

776 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