PDA

View Full Version : Need to Return to a specific slide



fadib
04-16-2010, 02:46 PM
Hi guys,
I have the following scenario.
I have Slide 1 and Slide 2 that both have a button to take me to slide 3.
Slide 3 has a button to take me back to the last viewed slide.
The problem that I am having is I have another button on Slide 3 that takes me to Slide 4.
So when I come back to slide 3, and I hit the return button, it takes me back to Slide 4. So I can never get back top Slide 1 or 2.

I know what need to be done, but can't figure it out in VBA.
I think what the code should do, is if I am on Slide 1 or 2 and I click to go to 3, somehow I need to save from where I have clicked. and in Slide 3 the button should call out that slide, instead of "Last viewed slide".

Please help.

John Wilson
04-16-2010, 09:51 PM
There are several ways in code but I would suggest adding a tag to store the route back. Have the buttons on 1,2, &3 run the relevant code here
Sub to3_from1()
SlideShowWindows(1).View.GotoSlide 3
ActivePresentation.Slides(3).Tags.Add "FROM", "1"
End Sub

Sub to3_from2()
SlideShowWindows(1).View.GotoSlide 3
ActivePresentation.Slides(3).Tags.Add "FROM", "2"
End Sub

Sub go_back()
SlideShowWindows(1).View.GotoSlide (CLng(ActivePresentation.Slides(3).Tags("FROM")))
End Sub

fadib
04-17-2010, 10:01 AM
Awesome, that is exactly what I am trying to do.
:thumb
Thanks a lot John.

Cosmo
04-18-2010, 05:28 AM
Another way that you may be able to do what you want without VBA would be to use Custom Shows.

If you create a Custom Show for Slide 3 and set your links on slides 1 & 2 to run the Slide 3 Custom Show with 'Show and Return' selected, then create another Custom Show for slide 4 and set the link on slide 3 to run this custom show with "Show and Return" selected, then it will return to the proper slides.

fadib
04-18-2010, 09:49 AM
Yes it works nice.
The only compromise I see in that, is how you end the custom show if you disable the mouse? (Like in Kiosk show)

Cosmo
04-18-2010, 01:21 PM
Yes it works nice.
The only compromise I see in that, is how you end the custom show if you disable the mouse? (Like in Kiosk show)
You can use the Escape key to end a show. Not sure if it works in kiosk mode or not, but I believe it should.

If not, you can use a button to end the show.