#1
|
|||
|
|||
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? |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
No sorry, I didn't get a solution.
|
#4
|
|||
|
|||
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 |
#5
|
|||
|
|||
if anyone can tell me how to add the decimals into the displayed output that would be really great :-)
|
#6
|
|||
|
|||
You declared CountNo as a Long. Longs can only be non decimal numbers.
Instead try Dim CountNo as Single |
#7
|
|||
|
|||
Thanks John - you'd never guess I was new to this :-)
|
#8
|
|||
|
|||
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") Last edited by JohnWilson; 10-31-2013 at 07:33 AM. |
#9
|
|||
|
|||
Thanks for that - if it's not a daft question, which line?
|
#10
|
|||
|
|||
Sorry, got it, it didn't work the first time I did it, then I realised I had a typo! Works fine now, thanks :-)
|
#11
|
|||
|
|||
Thanks a lot Jason66 for the answer!!
|
#12
|
|||
|
|||
Hey, I am not ble to download this template. Also I want to know what kind of object is the item counter
|
#13
|
|||
|
|||
Other Questions
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!!
|
Tags |
powerpoint presentation |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Developing a dynamic power point presentation | mgoldberg | PowerPoint | 1 | 04-03-2012 05:48 AM |
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 |
Notes in a Power Point presentation | kelly | PowerPoint | 2 | 11-09-2010 09:35 AM |