Go there, Come back
You have a navigation slide with buttons that take the user of your presentation to other parts of the presentation.
There, they may navigate here and there, you're not sure where.
You may even have several levels of navigation.
You want the user to be able to return to where they came from, but where they came from might not always be the same place.
In the declarations section of your code module:
Option Explicit Public ReturnToSlide As Long
Then add the following subs to your module:
Sub RememberWhere() ' Make the MOUSEOVER action of your navigation buttons run this ReturnToSlide = SlideShowWindows(1).View.Slide.SlideIndex End Sub Sub GoBack() ' Make this the MOUSECLICK action of the Return to
button SlideShowWindows(1).View.GotoSlide (ReturnToSlide) End Sub
On the buttons that take the user someplace, give them a MouseOver action setting of Macro and choose RememberWhere.
On the buttons that are to return the user to a remembered position, assign the MouseClick action as Macro and choose GoBack.
See How do I use VBA code in PowerPoint? to learn how to use this example code.