PDA

View Full Version : [SOLVED:] Issues with "OnSlideShowPageChange"



rhille
11-03-2017, 05:55 PM
Hello guys

I have a weird issue and I am trying to find out if I am missing something or if something is corrupted on my computer.

So, I created a file with a sub "OnSlideShowPageChange" that only displays the page number in a module. When I open the file and click directly on the SlideShow icon, the presentation runs fine but without any messages from the MsgBox commands. Now, when I click on the Developper tab and the VisualBasic icon in order to display the editor and that I don't change a thing and just close the editor, the messages appears when I run the presentation again...

Any ideas what could be wrong? I am using PPT 2016 on Windows 10.

20863

Thanks


Rick

Paul_Hossler
11-04-2017, 04:46 PM
Seems to work with PP 2016

But see this article and give it a try


http://www.pptfaq.com/FAQ01152_OnSlideShowPageChange_event_does_not_fire.htm




Problem

Your code that depends on the OnSlideShowPageChange( SHW as SlideshowWindow ) event works when run from within VBA or when you launch the presentation from within PowerPoint, but not when you start the show by doubleclicking the icon for the PPS or PPSM. The slide show launches normally, but the code in your OnSlideShowPageChange subroutine never runs.

Solution
Add an Active-X control (from the Developer tab) on first slide (drag it just off the slide if you don't want it visible during the slide show).
This forces VBA to initialize when the presentation starts, so the event gets triggered and your code runs.

rhille
11-06-2017, 07:56 PM
Hello Paul

Thank you for your answer. It seems like it solved the issue.

Thanks again


Rick