Link to home
Start Free TrialLog in
Avatar of ding-dong
ding-dongFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Command Buttons to change Slide in Powerpoint?

I have a command button called commandbutton1 from the control toolbox. It is in slide 6, when i click it, i would like it to go to slide 8. Any idea how to do this? I think I need to use VBA, if so, any idea of the script that would be needed?

Thanks

Ding-Dong
Avatar of dbase118
dbase118
Flag of United States of America image

You can do this much easier by going to the slide show menu and inserting an action button from the menu there. When you put one in and draw the size it will automatically pop a dialog box that will allow you to define the hyperlink.

Options for previous, next, last etc are listed first but further in the list you will see an option for Slide...

When you choose that you can give it any slide in your presentation as the button click destination.
good advice, i've been looking for this for 30 minutes and could not get it to work so i'm listening to learn :)
I have known from past experience to leave that control toolbox alone whenever possible.... :-)
Takes forever to even find the right spot to enter any code.
somehow activepresentation.slides(index).select is not available at runtime so if you really want to do it the hard way you probably have to catch an event, but i'm curious

maybe someone like TajSimmons jumps in later on, hyperlinking and a shape is much easier to find out, besides that it works ;)
Avatar of ding-dong

ASKER

I did think about an action button but I did not use it for two reasons:

1. I have two buttons on the slide, one of which uses VBA to do stuff in the slide that is necessary. These buttons are position right next to each other so two different buttons doesn’t look nice.

2. Because it has to be well presented and look professional and I just don’t like the look of action buttons how ever much I try to make them look nice. I know I’m being fussy, sorry.

Ding-Dong
ASKER CERTIFIED SOLUTION
Avatar of dbase118
dbase118
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
:-) wonderfull

knew i had seen that method once in my life should start to store my PAQs in a better manner then using google https://www.experts-exchange.com/questions/20570652/Need-a-VB-routine-to-quickly-export-all-charts-in-a-excel-spreadsheet-to-powerpoint.html
That’s great! It works thank you. I now have another problem... sorry (I'll increase the value of the question). I have a slide that should last 5 seconds, and then move onto the next slide. I have set it using the slide transition to “automatically after 05:00” but it doesn’t move on after the 5 seconds?

Ding-Dong
05:00 is 5 hours...00:05 is five seconds
Also if you go to the Slide Show menu and Set-up show make sure that under Advance slides, "using timings if present" is selected.
Ok that was just a stupid mistake! Also, is there a way to do something as the slide loads? Like onLoad? In VBA.
Afraid I cant help there. Not aware of the syntax for something like that. What are you trying to get done on Load?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
When one slide loads, I have a few text boxes that the user enters data into, I would like to make sure that everytime that slide is loaded, the text boxes are empty. The code is very basic to do this, its just doing it before the slide loads (Slide6.TextBox1.Text = ""). If I were to use AutoEvents, would it need to be installed on every system that the slide shows runs on?