VBA Timer

J

Jason Lopez

I need to add a timer on a single slide. I know that I could make a timer
out of multiple slides. But that is a waste of memory space (IMO) for a
presentation. I saw that someone created a presentation with a single slide
timer using VBA. But, can someone point me in the direction of where I can
get an understanding of how they did this and I can write my own macro code
for it?

Jason Lopez
 
C

carbuthn

John, depending on the version of PowerPoint (i.e. 2007) I have been having
problems getting Shyam code to work, I get an error message from the public
declaration of the sleep lib. used in the TMR sub. The second part works but
may need a screen refresh after a time delay.

Thank,
Chuck
 
C

carbuthn

Steve, sorry to take so long to get back to you, I did copy the whole section
of code into a new presentation.

The error message is:
"Compile error:
Constants, fixed-length strings, arrays, user-defined types and Declare
statements not allowed as Public members of object module."

The problem may have something to do with the company (IT) settings, but
appear after going to Powerpoint 2007 running on XP pro and new computers.

A old presentation that worked fine in 2003 has the same declaration for
Sleep lib works erratically, i.e. 1 second delay may be 3 seconds long and
after a DoEvent I have trouble getting the screen refreshed, i.e.
With ActivePresentation.Slides(1)
.Shapes("C1").Visible = Reset1
.Shapes("C17").Visible = Reset1
If Aux1 Then
.Shapes("C8").Visible = True
.Shapes("C7").Visible = False
Else
.Shapes("C7").Visible = True
DoEvents
If Reset1 Then
Sleep 500
End If
.Shapes("C8").Visible = False
End If

the last shape will not appear.

Thanks, Chuck
 

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