![]() English |
![]() Português |
|
|||
This utility is a small class module programmed in Microsoft® Visual Basic® for Application (VBA) in PowerPoint that generates a popup timer in Microsoft® PowerPoint® by calling via Automation the fStopwatch() function provided to VBA by the COM add-in named ‘Popup Stopwatch for Microsoft Excel’ also distributed on this site. This class module in turn also provides a fStopwatch() function for the VBA project of presentations opened in PowerPoint with the same functionalities as the function in Excel, making it possible to generate stopwatches, usually in countdown, in slideshow time with the possibility of, upon expiration, returning actions in PowerPoint or others via VBA or by sending key strokes. Download here and install the Excel COM add-in and test the examples of PowerPoint presentations using this module available below. Note: A similar COM add-in for PowerPoint could be developed, but it would have no advantage over this solution, quite the opposite. This solution can run dozens and even hundreds of simultaneous stopwatches in a presentation while consuming very few PowerPoint resources and using very little code in the presentation's VBA project. Furthermore, PowerPoint as a single-instance Windows application has its limitations when it comes to running simultaneous codes and would still lack adequate resources to make time snapshots, an important and useful stopwatch feature available in this solution. Following items in this page: Examples of Using the Stopwatch in PowerPoint Features:All listed here on the ‘Popup Stopwatch for Microsoft Excel’ homepage, except those that refer to Excel-only objects such as cells and worksheets. Configure Countdown:See how to configure a countdown here on the ‘Popup Stopwatch for Microsoft Excel’ homepage Download:The download required to test the examples listed below for PowerPoint is the same as the COM add-in available on the ‘Popup Stopwatch for Microsoft Excel’ homepage. Note! The add-in for 64-bit versions is not yet available. Tested in Excel 2000, 2002(XP), 2003, 2007, 2010 (32-bit), 2013 (32-bit), 2016 (32-bit), and 2019 (32-bit) in MSI-based and Click-To-Run installations of Office 365™ cloud-based services.
Note: The above link downloads the installer and uninstaller package programmed in VBA in a XLS duly converted to EXE by the XLtoEXE to make fully easy the installation by macro and Windows laymen, but, if you're expert and due some reason prefer an installer and uninstaller package in open zip, clique here. With this zip package you can install of three ways: (1) Simply act the Install.exe that loads the same XLS in Excel without macro alert; (2) Extract the all package to a folder and act the XLS enabling the macros in Excel and using 123 as password, or (3) Install the DLL manually. Pictures:The interface with dozens of settings that the stopwatch displays in popup in PowerPoint is the same as it displays in Excel. See the pictures here on the home page of ‘Popup Stopwatch for Microsoft Excel’. VBA fStopwatch() Function:The class module implemented in the VBA project of a PowerPoint presentation, as can be seen and copied in the examples below, will make available to the presentation's VBA project the same fStopwatch() function from the Excel COM add-in with all its 27 optional arguments. See its descriptions and how to configure them here on the ‘Popup Stopwatch for Microsoft Excel’ homepage. Examples of Using the Stopwatch in PowerPoint:Let's look at nine examples of using the stopwatch in PowerPoint presentations. Each example has been developed in a presentation saved as a unique ppt file ready to be tested in its own presentation and with all the instructions for you to implement in your presentations and, if you don't want to edit your presentations, it is ready for you to save as a ppa add-in and then use in your presentations without editing them. Each ppt is a source code in which you can change the settings of the stopwatch or stopwatches, improve them and then save as the desired ppa add-in. Before that, see a comparative summary of the examples showing differences in the main objectives and the developments between them: - The example 1 deals with creating command in the PowerPoint menu and short menus to call the stopwatch in a popup at project time, at slide edition time. - The examples 2 and 3 deal with countdown of interval for pause in a presentation, such as coffee break. While the Example 2 uses external files for the background picture and the expiration sound, the Example 3 does not, and can use picture in one slide in the active presentation and transition sound on another slide.
-
The examples 4, 5, 6, and 7 deal with countdown of transition time
to advance slides in a presentation. While In examples 4 and
5, the times for all slides are taken at the beginning so that
the parallel in the Example 4 or serial in the Example 5
stopwatches can manage the advances in a programmed manner from
the first to the last slide. Thus, in order to avoid a break in
continuity, there must be a defined time for each slide. If
there is not, a default of 10 seconds is adopted. - The examples 8 and 9 deal with countdown of steps in a presentation such as the minimum and maximum acceptable time to perform a presentation. While in the the Example 8 the stopwatches for each step are launched simultaneously in parallel, in the Example 9, they are launched in series. Example 1 - Creation of command in PowerPoint menu (See note 1)The purpose of this example is to show the VBA code needed to call the timer from the PowerPoint user interface, in the same way it is called from the Excel interface, using the last call here or there configuration saved in an ini file. Download the zipped ppt file of this example by clicking the link below and open it in PowerPoint: After opening the ppt in PowerPoint, you can: - You can immediately test its code in the example presentation itself, just run the SlideShow (F5) and click the “Start PowerPointStopwatch_Ex1” button available on the first slide to open the popup stopwatch in the PowerPoint interface or click the “Create Menu Buttons” button to create the command to open the stopwatch in the same way from the PowerPoint menu and context submenus. (See note 2) - You can implement the VBA code as it is in the example ppt in the VBA project of your specific presentation, just open the Visual Basic (VBE) window with Alt+F11 and copy the ClassPPointStopwatch class module and the standard ModExamp1 module from the example to the VBA project of your presentation. That's all, if you are going to save your presentation as a ppa add-in, but if you are going to use it as a normal presentation, you still need to create the button or buttons similar to those on the first slide of the example on the first slide of your presentation. - You can use the example VBA code in any of your presentations without the need for editing, simply run the add-in (ppa) from the example presentation, which you can create and save using the “Save as add-in (ppa)” button also available on the first slide. Note 1: This example is first not because of its importance, but to show that the ClassPPointStopwatch class module, in addition to providing the fStopwatch() function for the VBA project, can create a stopwatch in the PowerPoint user interface with all the functionality of the stopwatch in Excel, including a menu command to open the popup stopwatch during presentation editing time, which is unlikely to be useful. The following examples used during slideshow time are probably more useful. Note 2: To test presentations with VBA code, you need to set your PowerPoint macro security to medium so that you can enable macros when prompted when opening presentations. You also need to install 'Popup Stopwatch for Excel' which can be downloaded free for personal use from its homepage or in this homepage at Download. Example 2 - Countdown for coffee break (model 1)The purpose of this Example 2 is to show the VBA code needed to create a stopwatch in countdown for a coffee break in a presentation that uses external files for the background picture and the expiration sound. It teaches how to create a stopwatch to count down a time interval. Before starting the countdown, it pauses the slideshow of the active presentation and when the countdown expires, it resumes the slideshow. The stopwatch will be configured to move on the screen as a protector, with a transparent display and an opaque background with a picture from a jpg file saved on the disk and, when it expires it will beep and play a sound from a wav file. Both files must have the same name as the active presentation file and be saved in the same folder. Download the zipped ppt file of this example by clicking the link below and open it in PowerPoint: After opening the ppt in PowerPoint, you can: - You can immediately test its code in the example presentation itself, just run the SlideShow (F5) and click the “Start PowerPointStopwatch_Ex2” button available on the first slide to set the time interval and then start its countdown. (See note 2) - You can implement the VBA code as it is in the example ppt in the VBA project of your specific presentation, just open the Visual Basic (VBE) window with Alt+F11 and copy the class module ClassPPointStopwatch, the standard module ModExamp2, and the userform UFormExamp2 to the VBA project of your presentation. That's all, if you are going to save your presentation as an add-in (ppa, ppam), otherwise you still need to create similar button on slides of your presentation to start. (See note 3) - You can use the example VBA code in any of your presentations without the need for editing, simply run the add-in (ppa) from the example presentation, which you can create and save using the “Save as add-in (ppa)” button also available on the first slide. You don't need to install the add-in in PowerPoint, just double click on its ppa file in Windows Explorer and if your presentation is already open in PowerPoint it will start doing the same thing it does with its own test presentation, whereas if your presentation is not already open it will direct you to open it. Note 3: The VBA code in each example (press Alt+F11 to see) is properly formatted and has instructions to make it easier for you, even without knowledge of VBA, to change any of the hundreds of stopwatch settings, mainly interface elements related to sizes, position on the screen, colors, fonts, background picture, transparencies and even total transparency of the stopwatch with automatic show of only the display font when you bring the mouse closer or press the Ctrl key. Example 3 - Countdown for coffee break (model 2)The purpose of this Example 3 is to show the VBA code needed to create a stopwatch in countdown for a coffee break in a presentation that does not use external files for background picture and the expiration sound. It teaches how to create a stopwatch to count down a time interval. Before starting the countdown, it pauses the slideshow of the active presentation and when the countdown expires, it resumes the slideshow. The stopwatch will be configured to move on the screen as a protector, with a transparent display and also a transparent background to use the active slide itself as the background. In particular, if the active presentation has two hidden slides at the end with the first set to a coffee break picture and the next with a transition sound, it will activate the first one before the countdown starts and the second one when the countdown expires. Therefore, this example does not require picture and sound to be saved in separate files from the presentation file. Download the zipped ppt file of this example by clicking the link below and open it in PowerPoint: After opening the ppt in PowerPoint, you can: - You can immediately test its code in the example presentation itself, just run the SlideShow (F5) and click the “Start PowerPointStopwatch_Ex3” button available on the first slide to set the time interval and then start its countdown. (See note 2) - You can implement the VBA code as it is in the example ppt in the VBA project of your specific presentation, just open the Visual Basic (VBE) window with Alt+F11 and copy the class module ClassPPointStopwatch, the standard module ModExamp3, and the userform UFormExamp3 to the VBA project of your presentation. That's all, if you are going to save your presentation as an add-in (ppa, ppam), otherwise you still need to create similar button on slides of your presentation to start. (See note 3) - You can use the example VBA code in any of your presentations without the need for editing, simply run the add-in (ppa) from the example presentation, which you can create and save using the “Save as add-in (ppa)” button also available on the first slide. You don't need to install the add-in in PowerPoint, just double click on its ppa file in Windows Explorer and if your presentation is already open in PowerPoint it will start doing the same thing it does with its own test presentation, whereas if your presentation is not already open it will direct you to open it. Example 4 - Countdown to advance slide (In parallel)The purpose of this Example 4 is to show the VBA code needed to create a stopwatch in countdown on each slide to advance to the next slide when the countdown expires. The stopwatches for all slides will be launched in parallel and simultaneously. It also teaches how to launch more than one stopwatch simultaneously in parallel, counting down different times. A stack of stopwatches will appear on the screen, with the shortest one overlapping the longest one, but their buttons will be attached, so if the top one stops, the bottom one will also stop, and similarly if it restarts. Example 5 below, which has the same objective and efficiency, teaches how to launch in series, where the first one, upon expiring, calls the next one, thus keeping only a stopwatch counting on the display. Download the zipped ppt file of this example by clicking the link below and open it in PowerPoint: After opening the ppt in PowerPoint, you can: - You can immediately test its code in the example presentation itself, just run the SlideShow (F5) and click the “Start PowerPointStopwatch_Ex4” button available on the first slide to create a stopwatch in count down on each slide to advance to the next slide when the countdown expires. The time will be captured from the slide transition's AdvanceTime property, if it is set, otherwise a default time will be assumed. (See note 2) - You can implement the VBA code as it is in the example ppt in the VBA project of your specific presentation, just open the Visual Basic (VBE) window with Alt+F11 and copy the class module ClassPPointStopwatch and the standard module ModExamp4 to the VBA project of your presentation. That's all, if you are going to save your presentation as an add-in (ppa, ppam), otherwise you still need to create similar button on slides of your presentation to start. (See note 3) - You can use the example VBA code in any of your presentations without the need for editing, simply run the add-in (ppa) from the example presentation, which you can create and save using the “Save as add-in (ppa)” button also available on the first slide. You don't need to install the add-in in PowerPoint, just double click on its ppa file in Windows Explorer and if your presentation is already open in PowerPoint it will start doing the same thing it does with its own test presentation, whereas if your presentation is not already open it will direct you to open it. Example 5 - Countdown to advance slide (In series)The purpose of this Example 5 is to show the VBA code needed to create a stopwatch in countdown on each slide to advance to the next slide when the countdown expires. The stopwatches will be launched in series. one after the other. It also teaches how to launch more than one stopwatch in series, where the first one, upon expiring, calls the next one, thus keeping only a stopwatch counting on the display. Example 4, which has the same objective and efficiency, teaches how to launch more than one stopwatch simultaneously in parallel, counting down different times, thus forming a stack on the display. Download the zipped ppt file of this example by clicking the link below and open it in PowerPoint: After opening the ppt in PowerPoint, you can: - You can immediately test its code in the example presentation itself, just run the SlideShow (F5) and click the “Start PowerPointStopwatch_Ex5” button available on the first slide to create a stopwatch in count down there to advance to the next slide when the countdown there expires and so on. The time will be captured from the slide transition's AdvanceTime property, if it is set, otherwise a default time will be assumed. (See note 2) - You can implement the VBA code as it is in the example ppt in the VBA project of your specific presentation, just open the Visual Basic (VBE) window with Alt+F11 and copy the class module ClassPPointStopwatch and the standard module ModExamp5 to the VBA project of your presentation. That's all, if you are going to save your presentation as an add-in (ppa, ppam), otherwise you still need to create similar button on slides of your presentation to start. (See note 3) - You can use the example VBA code in any of your presentations without the need for editing, simply run the add-in (ppa) from the example presentation, which you can create and save using the “Save as add-in (ppa)” button also available on the first slide. You don't need to install the add-in in PowerPoint, just double click on its ppa file in Windows Explorer and if your presentation is already open in PowerPoint it will start doing the same thing it does with its own test presentation, whereas if your presentation is not already open it will direct you to open it. Example 6 - Countdown to advance slide (auto hook)The purpose of this Example 6 is to show the VBA code required to create a stopwatch, which will be called automatically by the application's SlideShowNextSlide event, in count down to advance to the next slide when the countdown expires. It's as if the stopwatch hooks for itself to make the PowerPoint's automatic slide advance feature, even though it's off. The time will be captured from the active slide transition's AdvanceTime property, if it is set, otherwise nothing happens. Only the amount of time in seconds set in the AdvanceTime property is important. The AdvanceOnTime and AdvanceMode properties that enable it are ignored, whether they are set to True or False, because the automatic advance of the slides will be done by the stopwatch and not by PowerPoint. Download the zipped ppt file of this example by clicking the link below and open it in PowerPoint: After opening the ppt in PowerPoint, you can: - You can immediately test its code in the example presentation itself, just run the SlideShow (F5) and click the “Start PowerPointStopwatch_Ex6” button available on the first slide to enable PowerPoint application events, and when activating a slide manually or by code, a countdown timer can be launched to do the advance to the next slide when the countdown expires. The time will be captured from the slide transition's AdvanceTime property, if it is set, otherwise nothing happens. (See note 2) - You can implement the VBA code as it is in the example ppt in the VBA project of your specific presentation, just open the Visual Basic (VBE) window with Alt+F11 and copy the class module ClassPPointStopwatch and the standard module ModExamp6 to the VBA project of your presentation. That's all, if you are going to save your presentation as an add-in (ppa, ppam), otherwise you still need to create similar button on slides of your presentation to start. (See note 3) - You can use the example VBA code in any of your presentations without the need for editing, simply run the add-in (ppa) from the example presentation, which you can create and save using the “Save as add-in (ppa)” button also available on the first slide. You don't need to install the add-in in PowerPoint, just double click on its ppa file in Windows Explorer and if your presentation is already open in PowerPoint it will start doing the same thing it does with its own test presentation, whereas if your presentation is not already open it will direct you to open it. Example 7 - Countdown to advance slide (PPAccelerator)The purpose of this Example 7 is to show the VBA code required to create a stopwatch in count down on each slide to advance to the next slide when the countdown expires. The time will be captured from the slide transition's AdvanceTime property, if it is set, or if it is entered directly by the user in a form displayed already with suggestions for each slide. The same form allows you to (de)accelerate the speed of the presentation or pin its end to a date/time on the clock with proportional and dynamic distribution of remaining time on the following slides. Only the amount of time in seconds set in the AdvanceTime property is important. The AdvanceOnTime and AdvanceMode proper-ties that enable it are ignored, because the automatic advance of the slides will be done by the stopwatch and not by PowerPoint and in proportional times according to the desired acceleration. This example gave rise to the add-in PPAccelerator for PowerPoint distributed here on this site. Download the zipped ppt file of this example by clicking the link below and open it in PowerPoint: After opening the ppt in PowerPoint, you can: - You can immediately test its code in the example presentation itself, just run the SlideShow (F5) and click the “Start PowerPointStopwatch_Ex7” button available on the first slide to create a stopwatch in count down on each slide to advance to the next slide when the countdown expires. Before the times will be captured from each slide transition's AdvanceTime property, if it is set, or if it is entered directly by you in a form displayed already with suggestions for each slide. The same form allows you to (de)accelerate the speed of the presentation or pin its end to a date/time on the clock with proportional and dynamic distribution of remaining time on the following slides. (See note 2) - You can implement the VBA code as it is in the example ppt in the VBA project of your specific presentation, just open the Visual Basic (VBE) window with Alt+F11 and copy the class module ClassPPointStopwatch, the standard module ModExamp7, and the userform UFormExamp7 to the VBA project of your presentation. That's all, if you are going to save your presentation as an add-in (ppa, ppam), otherwise you still need to create similar button on slides of your presentation to start. (See note 3) - You can use the example VBA code in any of your presentations without the need for editing, simply run the add-in (ppa) from the example presentation, which you can create and save using the “Save as add-in (ppa)” button also available on the first slide. You don't need to install the add-in in PowerPoint, just double click on its ppa file in Windows Explorer and if your presentation is already open in PowerPoint it will start doing the same thing it does with its own test presentation, whereas if your presentation is not already open it will direct you to open it. Example 8 - Countdown in presentation steps (in parallel)The purpose of this Example 8 is to show the VBA code needed to create two stopwatches in countdown launched in parallel and simultaneously. One to alert the minimum duration limit of the active presentation and another for the maximum. It also teaches how to launch more than one stopwatch simultaneously in parallel, counting down different times. A stack of stopwatches will appear on the screen, with the shortest one overlapping the longest one, but their buttons will be attached, so if the top one stops, the bottom one will also stop, and similarly if it restarts. Example 9 below, which has the same objective and efficiency, teaches how to launch in series, where the first one, upon expiring, calls the next one, thus keeping only a stopwatch counting on the display. Download the zipped ppt file of this example by clicking the link below and open it in PowerPoint: After opening the ppt in PowerPoint, you can: - You can immediately test its code in the example presentation itself, just run the SlideShow (F5) and click the “Start PowerPointStopwatch_Ex8” button available on the first slide to create in parallel two stopwatches in countdown. One to alert the minimum and another for the maximum duration limit of the active presentation with four slides set only to test this example. (See note 2) - You can implement the VBA code as it is in the example ppt in the VBA project of your specific presentation, just open the Visual Basic (VBE) window with Alt+F11 and copy the class module ClassPPointStopwatch, the standard module ModExamp8, and the userform UFormExamp8 to the VBA project of your presentation. That's all, if you are going to save your presentation as an add-in (ppa, ppam), otherwise you still need to create similar button on slides of your presentation to start. (See note 3) - You can use the example VBA code in any of your presentations without the need for editing, simply run the add-in (ppa) from the example presentation, which you can create and save using the “Save as add-in (ppa)” button also available on the first slide. You don't need to install the add-in in PowerPoint, just double click on its ppa file in Windows Explorer and if your presentation is already open in PowerPoint it will start doing the same thing it does with its own test presentation, whereas if your presentation is not already open it will direct you to open it. Example 9 - Countdown in presentation steps (in series)The purpose of this Example 9 is to show the VBA code needed to create two stopwatches in countdown launched in series. One to alert the minimum duration limit of the active presentation and another for the maximum. It also teaches how to launch more than one stopwatch in series, where the first one, upon expiring, calls the next one, thus keeping only a stopwatch counting on the display. Example 8 above, which has the same objective and efficiency, teaches how to launch more than one stopwatch simultaneously in parallel, counting down different times, thus forming a stack on the display. Download the zipped ppt file of this example by clicking the link below and open it in PowerPoint: After opening the ppt in PowerPoint, you can: - You can immediately test its code in the example presentation itself, just run the SlideShow (F5) and click the “Start PowerPointStopwatch_Ex9” button available on the first slide to create in series two stopwatches in countdown. One to alert the minimum limit for presentation and another for the maximum of this active presentation with four slides set only to test this example. (See note 2) - You can implement the VBA code as it is in the example ppt in the VBA project of your specific presentation, just open the Visual Basic (VBE) window with Alt+F11 and copy the class module ClassPPointStopwatch, the standard module ModExamp9, and the userform UFormExamp9 to the VBA project of your presentation. That's all, if you are going to save your presentation as an add-in (ppa, ppam), otherwise you still need to create similar button on slides of your presentation to start. (See note 3) - You can use the example VBA code in any of your presentations without the need for editing, simply run the add-in (ppa) from the example presentation, which you can create and save using the “Save as add-in (ppa)” button also available on the first slide. You don't need to install the add-in in PowerPoint, just double click on its ppa file in Windows Explorer and if your presentation is already open in PowerPoint it will start doing the same thing it does with its own test presentation, whereas if your presentation is not already open it will direct you to open it.
|
|||
|