I would like to add that this event really depends on the version of PowerPoint. For me (PP 2007), the following event works quite stably:
Sub OnSlideShowPageChange(ByVal objWindow As SlideShowWindow) Debug.Print objWindow.View.Slide.SlideIndex ' you can use this to check which slide invokes the event End Sub
This code does not need additional class structures (PPTEvent). But if you plan to use other events, it is recommended that you enable the initialization of this class in OnSlideShowPageChange.
Please note that this code copes with the first part of the given task - entering the slide. You may ask, "How about his departure?" Well, this is a matter of relativity. That which is included in one slide, at the same time goes to another. Just use objWindow.View.Slide.SlideIndex to track the current slide, compare it to the previous slide index and decide you just left it.
hypers
source share