Consulting

Results 1 to 8 of 8

Thread: Simulate a "Back" navigation button

  1. #1
    VBAX Regular
    Joined
    Apr 2008
    Posts
    97
    Location

    Question Simulate a "Back" navigation button

    Hello all, Really new to VBA in PPT and it looks a lot different than Excel

    I want to have a macro that I can attach to a "Back" button object that will navigate back to the last viewed slide, but, wait for it..... that has at least a 10 slide history associated with it.

    I would put the same "Back" object on every slide linked to the macro so when clicked it would navigate back to the next previously viewed slide in the history.

    Where to start, where to start???
    Powerpoint 2003

    Thanks for any help you can give.
    </IMG>

  2. #2
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    Quote Originally Posted by slang
    Hello all, Really new to VBA in PPT and it looks a lot different than Excel

    I want to have a macro that I can attach to a "Back" button object that will navigate back to the last viewed slide, but, wait for it..... that has at least a 10 slide history associated with it.

    I would put the same "Back" object on every slide linked to the macro so when clicked it would navigate back to the next previously viewed slide in the history.

    Where to start, where to start???
    Powerpoint 2003

    Thanks for any help you can give.
    </IMG>
    This can be done, but it could get a bit tricky depending on how you navigate through the document. Do you only use buttons to advance through the slides, or can the user use the default mouse click to advance slides.

    You can set up a global array to hold the last 10 slide numbers, and whenever you advance slides, add the current slide number to the top of the list, and drop the 11th slide number. The back button would go to the previous and drop the top number.

    If you only allow advancing thorugh buttons, you could have them run a macro to do this, but if you allow the user to advance through the built-in methods (mouse click, using the slide menu at the lower left, or typing the slide number and pressing the enter key) then you need to build the array when the slide changes, and this is a lot more involved.

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    If

    1. I'm understanding what you want (go back one at a time?)
    2. Remembering how 2003 worked (I only have 2007 now)

    .. on the master slide I used to put an Action Button to go to the previous slide (also did other things on the master).

    Never needed VBA just for that

    This is a 2007 version backsaved to 2003, so it's "probably" OK

    Paul

  4. #4
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    Quote Originally Posted by Paul_Hossler
    If

    1. I'm understanding what you want (go back one at a time?)
    2. Remembering how 2003 worked (I only have 2007 now)

    .. on the master slide I used to put an Action Button to go to the previous slide (also did other things on the master).

    Never needed VBA just for that

    This is a 2007 version backsaved to 2003, so it's "probably" OK

    Paul
    That will not do what the user wants. If you start on slide 1, then go to slide 3, then slide 5, your button will take them to slide 4 since you used "Previous Slide". Setting the action to go to "Last Viewed Slide" would be closer to what the user wants, as it would take the user back to slide 3, but since it only remembers the last slide, and not the history, clicking on the back button from there would take you to slide 5 again (since that was the 'last viewed') and not back to slide 1, which was the slide viewed in the history before slide 3.

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    Oh, well ... I should have been worried when it seemed too easy

    BTW, 'Last Viewed Sldie' in 2007 seems to take me to the Next Slide.

    I changed the action button to LVS, started with #1, then #2, jumped to #4, but the action button jumped me to #5.

    Paul

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    This is only possible with vba and it's not easy!
    First you need to run the record macro when the slideshownextslide event happens. Events are MUCH harder in PPT than in Excel!

    Second you need to record the slide to a Public Array as Cosmo said

    Third Track back using the array and delete the last array member.

    3a DON'T record the slides when the back button is used. (Think about this)

    Demo (not fully thought out but should be a pointer) attached

    Click the red arrow (just once) to start recording, change slides a few times, click back to backtrack
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  7. #7
    VBAX Regular
    Joined
    Dec 2009
    Posts
    15
    Location
    Isn't it possible for you to just use 'custom show' (i think this is the correct term, my pp is in dutch ^^)
    This way you can select wich sheets to use in the show, when you click back in will look in your custom show?

  8. #8
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    Quote Originally Posted by Emperor
    Isn't it possible for you to just use 'custom show' (i think this is the correct term, my pp is in dutch ^^)
    This way you can select wich sheets to use in the show, when you click back in will look in your custom show?
    Not exactly the same thing, although depending on the situation, custom shows may give something similar to what the user wants. If the presentation is broken down into sections, and each section is a custom show, then you can return to the slide that called that show. I use them a lot like this (currently working on one now which may have as many as 30 custom shows*), but it is not a true 'back' navigation system as was requested as it doesn't return to the previously viewed slide, only to the slide which called the custom show.


    * I really hope that MS revamps the interface for editing custom shows in the next version (although I doubt they will); or that I get the time to work on the VBA custom show editor that I had been playing around with a while ago. Right now, neither option seems too promising to me.

Posting Permissions

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