Results 1 to 3 of 3

Thread: Increasing a count automatically

  1. #1

    Increasing a count automatically

    Hi there, new here and I really hope someone here has an answer to this one (if there is one). I have a presentation that runs 24/7. One of the slides indicates the number of days my facility has gone without a safety issue. Let's say that it's currently at 800 days, is there a way for it to automatically increase that count by 1 every day including weekends?

  2. #2
    I found a solution, not one I like but at least it works.
    I created an excel spreadsheet that used the datedif function to find the number of days. I then hid everything except the result and altered the font and size to do what I needed in PowerPoint. I then linked to the excel spreadsheet... from there I put in some VB coding that updates all of the slides at regular intervals while the slideshow is running.
    Kinda clumsy but it doesn't appear to slow down the presentation any.

  3. #3
    VBAX Master
    Feb 2007
    You can code this directly in PPT using the same DateDiff and putting the result in a textbox.

    Example code to play with

    Sub OnSlideShowPageChange(SW As SlideShowWindow)
    Dim daysCount As Long
    Dim startDate As Date
    startDate = CDate("19 June 2018")
    ' Note to make this reliable add a command button to the first slide
    ' and set it to not visible in the selection pane
    ' obviously change the shape name for text
    If SW.View.CurrentShowPosition = 1 Then
    daysCount = DateDiff("d", startDate, Now)
    ActivePresentation.Slides(1).Shapes("My TextBox").TextFrame.TextRange = "Days Accident Free: " & CStr(daysCount)
    End If
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts