A family of Microsoft presentation graphics products that offer tools for creating presentations and adding graphic effects like multimedia objects and special effects with text.
Here is an example for you to try. Build it, confirm that it works, and then try to apply it to your specific needs.
Steps:
- Open a blank PowerPoint presentation with a single, blank slide
- Do a "Save As" and save it as a ".pptm" (macro enabled) file
- Insert a single TextBox. Type in "00:00:00". Format the font, font size, etc, as desired.
- Rename the TextBox "TimerTextBox" by selecting it, clicking on the Home tab, selecting "Select/Selection Pane..." and then typing a new name in for "TextBox 1"
- Insert a single, "Custom" action button: Insert/Shapes/Action Buttons/Custom
- Size the Action Button to exactly cover the text box. Make the Action Button at least partially transparent to show the Text Box below it.
- Click on the Developer tab, and select "Visual Basic"
- In the Visual Basic Editor, select "Insert/Module" to insert a new code module. Add the code below to that module.
- Run the slideshow
- Click on the action button to start the macro.
- The count up should begin
Will this work for you? It can easily be adapted to other needs.
Eric
'===== BEGIN CODE =====
Option Explicit
Private Const TIMERLIMIT As Single = 30# ' Number of seconds to count before stopping
Private Const UPDATEDELTA As Single = 1# ' Update display every (pick a value) seconds
Sub UpdateTimerTextBox()
Dim tStr As String
Dim time1 As Single, time2 As Single, time3 As Single
Dim updateTime As Single
'
time1 = Timer()
time2 = Timer()
time3 = Timer()
'
ActivePresentation.Slides(1).Shapes("TimerTextBox").TextFrame.TextRange.Characters = "00:00:00"
DoEvents
'
While (time3 - time1 < TIMERLIMIT And Application.SlideShowWindows.Count > 0)
time3 = Timer()
If (time3 - time2 > UPDATEDELTA) Then
tStr = Format((time3 - time1) / (24# * 60 * 60), "hh:mm:ss")
ActivePresentation.Slides(1).Shapes("TimerTextBox").TextFrame.TextRange.Characters = tStr
DoEvents
time2 = time3
End If
Wend
End Sub
'====== END CODE =====