Microsoft Office Forums Add a counter to a Power Point Presentation

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2013, 02:41 AM
Polo64 Polo64 is offline Add a counter to a Power Point Presentation Windows XP Add a counter to a Power Point Presentation Office 2003
Novice
Add a counter to a Power Point Presentation
 
Join Date: Mar 2013
Posts: 3
Polo64 is on a distinguished road
Default Add a counter to a Power Point Presentation

I would like to add a counter to a power point presentation. Do you know if this could be done and how?

Basically here is what I would like to do: display a counter representing for example the number of cars rented since the beginning of my presentation. So for example, at the start the counter is at 0 and every minute is incremented of 2000 (this is just an example). We can see the counter on every slide, so at the end of my talk people can see (and I'll tell them) that since the beginning of the talk X(large number) cars have been rented.

I tried to find something on the internet but without success... I hope someone will be able to help me?
Reply With Quote
  #2  
Old 10-28-2013, 09:58 AM
jason66 jason66 is offline Add a counter to a Power Point Presentation Windows 8 Add a counter to a Power Point Presentation Office 2010 32bit
Novice
 
Join Date: Oct 2013
Posts: 6
jason66 is on a distinguished road
Default VBA Counters in Powerpoint

Did you ever get a solution to this question?

I have a very similar quest - I want to show how much potential benefit has been lost through not making a change - so I can say "Look at the totaliser on each slide, this shows the money that's been lost because you didn't make the change this presentation is trying to convince you to make"

So far I can make the code to do what I want in Excel, I thought I could just embed that Excel in a slide but that doesn't work. Excel won't update when embedded so all I get is a static cell in my PowerPoint.

I then thought I could use the VBA from Excel and put that into PowerPoint but I ran out of talent and can't figure it out :-(

Any words of wisdom/encouragement?

Oh and the animated idea is OK but I could conceivably be running the slides for several hours, even all day - so it needs to be a sensible coded solution I think. The rate of "lost" money is something like 76.10 per minute - so I need something that updated with 76.10 every 60 seconds in a box I can put a currency sign in front (GBP or ).

All ideas gratefully received.

J
Reply With Quote
  #3  
Old 10-28-2013, 11:07 AM
Polo64 Polo64 is offline Add a counter to a Power Point Presentation Windows XP Add a counter to a Power Point Presentation Office 2003
Novice
Add a counter to a Power Point Presentation
 
Join Date: Mar 2013
Posts: 3
Polo64 is on a distinguished road
Default

No sorry, I didn't get a solution.
Reply With Quote
  #4  
Old 10-29-2013, 12:55 AM
jason66 jason66 is offline Add a counter to a Power Point Presentation Windows 7 64bit Add a counter to a Power Point Presentation Office 2010 64bit
Novice
 
Join Date: Oct 2013
Posts: 6
jason66 is on a distinguished road
Default A Solution

I managed to find something last night with the help of a friend although where it came from is a bit of a mystery! Kudos to the original author, sorry we can't trace where it came from.

Anyway, here's a simple counter in PowerPoint that runs throughout the presentation (it's in the Master Slide template).

To make the counter total your chosen metric just edit the VBA - for instance I want it to show 76.10 every 60 seconds.

Limitations are that as soon as you click the button it registered one unit (in my case 76.10) and I can't seem to figure out how to show decimals so it rounds the number (and just shows 76)

Here's the code I used

Code:
Dim Offset As Single
Dim CountNo As Long
Dim x As Single


Private Sub CommandButton1_Click()

Offset = ActivePresentation.PageSetup.SlideHeight + 10
CountNo = 76.1
' ADJUST THIS waitTime NUMBER WITH SECONDS DELAY BETWEEN COUNTER INCREMENTS
waitTime = 60
' ADJUST THIS maxCount NUMBER WITH MAXIMUM NUMBER COUNTER SHOULD REACH
maxCount = 500000

Do Until CountNo = maxCount + 76.1
  ActivePresentation.SlideMaster.Shapes("Counter").TextFrame.TextRange.Text = CountNo
  ActivePresentation.SlideMaster.Shapes("Counter").Top = ActivePresentation.SlideMaster.Shapes("Counter").Top + Offset
  DoEvents
  ActivePresentation.SlideMaster.Shapes("Counter").Top = ActivePresentation.SlideMaster.Shapes("Counter").Top - Offset

  x = Timer
  While Timer - x < waitTime
    DoEvents
  Wend

  CountNo = CountNo + 76.1
  
  If SlideShowWindows.Count = 0 Then
    ActivePresentation.SlideMaster.Shapes("Counter").TextFrame.TextRange.Text = 1
    ActivePresentation.SlideMaster.Shapes("Counter").Top = ActivePresentation.SlideMaster.Shapes("Counter").Top + Offset
    DoEvents
    ActivePresentation.SlideMaster.Shapes("Counter").Top = ActivePresentation.SlideMaster.Shapes("Counter").Top - Offset
    Exit Do
  End If
  
Loop

End Sub
Attached Files
File Type: zip Powerpoint with counter.zip (38.8 KB, 151 views)
Reply With Quote
  #5  
Old 10-30-2013, 04:51 AM
jason66 jason66 is offline Add a counter to a Power Point Presentation Windows 7 64bit Add a counter to a Power Point Presentation Office 2010 64bit
Novice
 
Join Date: Oct 2013
Posts: 6
jason66 is on a distinguished road
Default

if anyone can tell me how to add the decimals into the displayed output that would be really great :-)
Reply With Quote
  #6  
Old 10-30-2013, 09:34 AM
JohnWilson JohnWilson is offline Add a counter to a Power Point Presentation Windows 7 64bit Add a counter to a Power Point Presentation Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,781
JohnWilson will become famous soon enoughJohnWilson will become famous soon enough
Default

You declared CountNo as a Long. Longs can only be non decimal numbers.

Instead try Dim CountNo as Single
__________________
Microsoft PowerPoint MVP
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #7  
Old 10-30-2013, 11:14 AM
jason66 jason66 is offline Add a counter to a Power Point Presentation Windows 7 64bit Add a counter to a Power Point Presentation Office 2010 64bit
Novice
 
Join Date: Oct 2013
Posts: 6
jason66 is on a distinguished road
Default

Quote:
Originally Posted by JohnWilson View Post
You declared CountNo as a Long. Longs can only be non decimal numbers.

Instead try Dim CountNo as Single
Thanks John - you'd never guess I was new to this :-)
Reply With Quote
  #8  
Old 10-30-2013, 12:20 PM
JohnWilson JohnWilson is offline Add a counter to a Power Point Presentation Windows 7 64bit Add a counter to a Power Point Presentation Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,781
JohnWilson will become famous soon enoughJohnWilson will become famous soon enough
Default

You'd be surprized how many folk don't understand integers, longs, singles & doubles!

You could also change the line to:

Code:
ActivePresentation.SlideMaster.Shapes("Counter").TextFrame.TextRange.Text = "" & Format(CStr(CountNo), "00.00")
__________________
Microsoft PowerPoint MVP
Free Advanced PowerPoint Tips and Tutorials

Last edited by JohnWilson; 10-31-2013 at 07:33 AM.
Reply With Quote
  #9  
Old 10-30-2013, 02:49 PM
jason66 jason66 is offline Add a counter to a Power Point Presentation Windows 7 64bit Add a counter to a Power Point Presentation Office 2010 64bit
Novice
 
Join Date: Oct 2013
Posts: 6
jason66 is on a distinguished road
Default

Thanks for that - if it's not a daft question, which line?
Reply With Quote
  #10  
Old 10-30-2013, 02:58 PM
jason66 jason66 is offline Add a counter to a Power Point Presentation Windows 7 64bit Add a counter to a Power Point Presentation Office 2010 64bit
Novice
 
Join Date: Oct 2013
Posts: 6
jason66 is on a distinguished road
Default

Sorry, got it, it didn't work the first time I did it, then I realised I had a typo! Works fine now, thanks :-)
Reply With Quote
  #11  
Old 10-31-2013, 09:05 AM
Polo64 Polo64 is offline Add a counter to a Power Point Presentation Windows XP Add a counter to a Power Point Presentation Office 2003
Novice
Add a counter to a Power Point Presentation
 
Join Date: Mar 2013
Posts: 3
Polo64 is on a distinguished road
Default

Thanks a lot Jason66 for the answer!!
Reply With Quote
  #12  
Old 05-12-2016, 10:21 PM
dharini dharini is offline Add a counter to a Power Point Presentation Windows 10 Add a counter to a Power Point Presentation Office 2013
Novice
 
Join Date: May 2016
Posts: 1
dharini is on a distinguished road
Default

Hey, I am not ble to download this template. Also I want to know what kind of object is the item counter
Reply With Quote
  #13  
Old 06-03-2016, 07:49 AM
GENTNERDUNN GENTNERDUNN is offline Add a counter to a Power Point Presentation Windows 7 64bit Add a counter to a Power Point Presentation Office 2010 32bit
Novice
 
Join Date: Jun 2016
Posts: 1
GENTNERDUNN is on a distinguished road
Default Other Questions

Quote:
Originally Posted by JohnWilson View Post
You declared CountNo as a Long. Longs can only be non decimal numbers.

Instead try Dim CountNo as Single
I was wondering if you could help me change up the location of the counter? I can move the "Start Counter" just by clicking and dragging. But I want to move the counter itself somewhere else. I ultimately want to put this code in a PowerPoint I already have created somehow and still have the numbers adding on each slide. I would also like to change the name of "Counter" where the number is adding up to something else is that possible? If you can help me in any way I would appreciate it I have this presentation draft due Monday!!
Reply With Quote
Reply

Tags
powerpoint presentation

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a counter to a Power Point Presentation Developing a dynamic power point presentation mgoldberg PowerPoint 1 04-03-2012 05:48 AM
Add a counter to a Power Point Presentation power point presentation alobi PowerPoint 1 11-10-2011 03:00 PM
need help for my power point poster presentation ikyoo PowerPoint 0 08-28-2011 05:57 PM
i need help with my power point presentation napninjax PowerPoint 4 08-28-2011 02:31 PM
Add a counter to a Power Point Presentation Notes in a Power Point presentation kelly PowerPoint 2 11-09-2010 09:35 AM


All times are GMT -7. The time now is 01:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft