Power point and VBA

N

Nadia

Hello,

I have to create a GUI prototype and I am having problem
with VBA Script.

My first slide (called Slide1) has a VB command/push
button. I want to be able to click on this button and
advance to another page (called Slide2).

I double-clicked on the button to bring up the code screen
so I can code this, but I don't remember how to what the
exact code is to trigger going to Slide2.

My Object is set to the command button, and my procedure
is 'Click'. But thats all I know.

Your help is greatly appreciated.

Thanks,
Nadia
 
P

PTT, Inc.

This takes you to the next slide:

ActivePresentation.SlideShowWindow.View.Next

This takes you to a specified slide (in this case, Slide 2):

ActivePresentation.SlideShowWindow.View.GotoSlide (2)

Bill Foley
www.pttinc.com
 
S

Shyam Pillai

I'll just make a minor addition.

This takes you to the next slide or next build, whichever may be the case.
ActivePresentation.SlideShowWindow.View.Next

This takes you to the next slide irrespective of any animations that are
still to occur on the current slide.

On Error Resume Next
If SlideShowWindows.Count > 0 Then
With SlideShowWindows(1).View
.GotoSlide .CurrentShowPosition + 1
End With
End If

--
Regards
Shyam Pillai

Toolbox for PowerPoint
http://www.mvps.org/skp/toolbox
 
P

PTT, Inc.

Ooh, great idea. I didn't even think of that. I normally assign the action
to a button that I know is at the end of any animations, but this is good to
know!

THANKS!

Bill Foley
www.pttinc.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top