Consulting

Results 1 to 6 of 6

Thread: Need to Return to a specific slide

  1. #1
    VBAX Regular
    Joined
    Oct 2007
    Posts
    97
    Location

    Need to Return to a specific slide

    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.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    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
    [VBA]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[/VBA]
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Regular
    Joined
    Oct 2007
    Posts
    97
    Location
    Awesome, that is exactly what I am trying to do.

    Thanks a lot John.

  4. #4
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    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.

  5. #5
    VBAX Regular
    Joined
    Oct 2007
    Posts
    97
    Location
    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)

  6. #6
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    Quote Originally Posted by fadib
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •