Adding a daily counter

C

Chad

Hello, how would I add a counter to a looping presentation? I want to have a
text box on one of my slides that would count each day that goes by from a
start date so every new day it would count up. Is this possible and if so
how? Thanks...

Newbie,
Chad
 
V

vindys

Try this VBA
Sub FindDateDiff()
Dim d As Date
d = DateValue("April 11, 2008") ' Converts to a date.
ActiveWindow.Selection.ShapeRange(1).TextFrame.TextRange.Text =
DateDiff("d", d, Now)
End Sub

You can change from ActiveWindow.Selection.ShapeRange(1) to the particular
shape which you want to show the text on.

Thanks,
Vindys
 
C

Chad

Vindys, I have found that you can link tables from an excell workbook and
have it auto update every time powerpoint is opened. I could use this but my
presentation never shuts off so I would have to auto update with code. How
could I do this? Thanks!
 
V

vindys

Hi Chad,
You can right click on the excel shape and you can click on "Update Link" to
update the link. Through the following code too it will update the link.

ActiveWindow.Selection.ShapeRange(1).LinkFormat.Update
 
C

Chad

Vindys, where would I put the
ActiveWindow.Selection.ShapeRange(1).LinkFormat.Update and how do I get it to
auto update? Im new to this so could you explain? Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top