PowerPoint start and stop VBA on Slideshow

User avatar
ErikJan
BronzeLounger
Posts: 1228
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

PowerPoint start and stop VBA on Slideshow

Post by ErikJan »

I'd like to run VBA code when a users starts the slideshow and stop that code when the users exits the slideshow. I can't find clear info on how that is done. Any quick tips. I see Application.SlideShowEnd and Application.SlideShowBegin mentioned but -again- usage is unclear.

User avatar
HansV
Administrator
Posts: 78416
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PowerPoint start and stop VBA on Slideshow

Post by HansV »

What do you want the code to do?
Best wishes,
Hans

User avatar
ErikJan
BronzeLounger
Posts: 1228
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: PowerPoint start and stop VBA on Slideshow

Post by ErikJan »

Put a presentation timer on each slide. That code is easy (and I found an example that I am tweaking), just need the timer to start when the presentation starts and to stop... when it stops ;-)

User avatar
HansV
Administrator
Posts: 78416
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PowerPoint start and stop VBA on Slideshow

Post by HansV »

You'd have to create an add-in, for that is the way to run code automatically in PowerPoint.

See Make your VBA code in PowerPoint respond to events
Best wishes,
Hans

User avatar
ErikJan
BronzeLounger
Posts: 1228
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: PowerPoint start and stop VBA on Slideshow

Post by ErikJan »

Thanks Hans. That's too complicated to deploy easily I think so I'll let this go