Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Timer in power point

Posted on 2004-04-26
5
Medium Priority
?
583 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 1000 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

604 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