VBA goto next slide on mousedown etc

  • Thread starter Thread starter sanj
  • Start date Start date
S

sanj

Hi,

Does anyone know how to force the show to goto next slide upon mouse click,
pagedown etc, I have a few Flash files in the slides and sometimes the slide
does not advance on a click / pagedown etc.

Thanks,

Sanj
 
Are you trying to advance the slide before the Flash object finishes playing?
The first click stops the object playing then another click will advance the
slide. Does the same thing when you set animations to run until the end of
slide.

Glenna
 
The prolem I'm having is the animation is looping, the slide sometimes does
not advance.

Thanks,

Sanj
 
You can have a simple macro that sends you to the desired slide number. For
example:

Sub GoToTwo()
ActivePresentation.SlideShowWindow.View.GotoSlide (2)
End Sub
 
No, it needs to be assigned to some sort of button/object. For example,
draw an AutoShape action button (can even use the "Next" arrow). On the
Action Settings, choose "Run macro" and select the above macro (which you
put into a Module using the VBE editor).

To include the code in your presentation:

1. Open your presentation
2. Press ALT+F11 to enter the VBE
3. Click "Insert", "Module".
4. Copy and paste the code below (changing the slide number you want to go
to).
5. Close the VBE window
6. Perform steps mentioned above to draw a button and assign the macro
 
Thansk Bill,

Is it possible to use your macro to goto the next slide (whatever you are
on) i.e.

Sub GoToTwo()
ActivePresentation.SlideShowWindow.View.GotoSlide (NEXT)
End Sub

Thanks

Sanjay
 
There is code that will go to the next slide, but it works based on click
animations. For example, if you have 5 objects on a slide and each one is
set to animate on a mouse click when you run the code, the next object is
animated. When all objects have appeared it will take you to the next
slide. With the problem you are having with Flash, I'm not sure if this
code will work for you, but you can try. The code is:

Sub GoToNext()
ActivePresentation.SlideShowWindow.View.Next
End Sub
 
To go to the next slide, you can either, as Bill suggested, use:

ActivePresentation.SlideShowWindow.View.Next

but (as Bill suggested) that will take you to the next animation, or you
can use:

Sub NextSlideReally()
Dim curSlideNum As Long

curSlideNum = _
ActivePresentation.SlideShowWindow.View.Slide.SlideIndex
ActivePresentation.SlideShowWindow.View.GotoSlide curSlideNum + 1
End Sub

This will generally do what you want as long as it is not on the last
slide and as long as you don't expect it to behave just like clicking to
go to the next slide (e.g., it won't work on the last slide, it won't
skip hidden slides).

--David
--
David M. Marcovitz
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Back
Top