macro

  • Thread starter Thread starter Joep
  • Start date Start date
J

Joep

hi,

I want to start a macro by clicking on an actionbutton during the
presentation. Who knos how I should do this?

Thanx

Joep
 
You create your macro in the VBE window, insert your action button, in the
action Settings dialog box, click the "Run macro" option and select the
macro you want to run in the dropdown box.

What exactly is this macro going to be doing?
 
What Bill said and ...

The action button will only work when you are in Slide Show view, so if
you try to click on it in Edit/Normal view, it won't run your macro.

--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/
 
Thanks for your time Bill;
The macro makes a hyperlink on a button that is already on the slide. What
you propose doesn't work. I don't know why...
 
Okay, I see we need some explaining here! A macro is a programming tool
that combines a variety of repeated steps or steps not normally obtained
from the built-in user interfaces in PowerPoint. A Hyperlink to another
slide in your presentation is NOT a macro. You statement, "The macro makes
a hyperlink on a button that is already on the slide" does not make sense.
Not sure if it is a translation thing or miscommunication thing.

What exactly are you trying to accomplish when you click an action button on
your slide (while in Slide Show Mode)? Chances are you are linking to
another slide. If that is the case, right-click your button or object,
click "Action Settings". Click the "Hyperlink to" dropdown and select
"Slide". Choose the slide you want to link to and click "OK". Make sure
the "Highlight click" checkbox is checked in the bottom left hand corner.
Click "OK" again. Go into Slide Show Mode and click your button to see it
work.

Holler back if this is not what you are trying to do.
 
Thanks for your time Bill;
The macro makes a hyperlink on a button that is already on the slide. What
you propose doesn't work. I don't know why...

Add this line at the beginning of the macro:

Msgbox("Bill's suggestion works.")

Now try clicking the action button that's assigned to the macro.
Does it display a message box but not do anything else?

If so, the problem is likely with your code, in which case post it here if you
like and we'll have a look.
 
Hi Bill,

I think that I am seeing the same situation. I wrote some simple macros to
highlight objects on a slide by changing their color. The macros work fine
when I use "tools macro run". Now, I tried to run the macros using different
action buttons, one for each macro following the procedure in Help. When I
click the mouse on the button (in slide show mode), the contrast on the
button changes for about 1/4 second, but no macro. The action button
technique works fine for jumps to other slides or even other presentations
but not for executing macros.

Do you have any ideas how to make this feature work? It would be a really
powerful tool for the presentation I am doing.

Thanks,
Joe Nemchik
 
Joe,
What version of PPT do you have? If you have PPT 2002 or later, you might
find it easier to change the colors by using triggered emphasis
animations....

--
Kathryn Jacobs, Microsoft MVP PowerPoint and OneNote
Author of Kathy Jacobs on PowerPoint - Available now from Holy Macro! Books
Get PowerPoint answers at http://www.powerpointanswers.com
I believe life is meant to be lived. But:
if we live without making a difference, it makes no difference that we lived
 
Some VBA code works differently in Edit/Normal view than it does in Slide
Show view. If you record a macro in Edit/Normal view, it will rarely work in
Slide Show view because recorded macros usually do things by selecting
objects, and you can't select objects in Slide Show view. If you post your
code here, someone might be able to help you fix it.
--David

David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Thanks for your time everybody. I think David gave me the right explenation:
you can't select in slide show view!!
I try to explain the problem again (I'm not so good in english): there are
three action buttons on a slide. One of them with a link. You have to click
that one to continue. When you've seen some slides you return to the first
slide. Now the second button must have a link to!! and that is what doesn't
work. Sorry I didn't explain it like this before.
 
You want your code to have a line that is something like this:

ActivePresentation.Slides(1).Shapes(3).Fill.ForeColor.RGB = vbBlue

This will change the color of the 3rd shape on the 1st slide to blue.
Change the numbers to apply to different slides and different shapes.
Recording a macro will try to select the shape and change its color, but
that won't work in Slide Show view. If you have recorded a macro, you
can get some benefit from it. You can use the color in the recorded
macro to replace vbBlue with the exact color you want.

--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/

=?Utf-8?B?RGF2aWQgTS4gTWFyY292aXR6?=
 
Are you just linking from one slide to another? You don't need macros
for this. Create your buttons and set the Action Settings to Hyperlink
to a specific slide. These will work without macros in Slide Show view.
Is there more that you want to do besides linking to other 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/
 
It is almost sounding like you will need a macro to do this. What you can
do with macros is to hide a button on a slide (set it's visible property to
false) and run a macro on the other slide that goes back to the original
slide and shows the second button (which merely has a link to another
slide).

Is this what you are looking for? If so, holler back and I can provide some
code or David can point you to one of his pages that has examples.
 
If that's what you want, then I think the closes example I have is 7.11
on my site (click on Examples by Chapter and Chapter 7):

http://www.loyola.edu/education/PowerfulPowerPoint/

This is a tutorial and quiz. There is a hidden quiz button that only
shows up after all the tutorial sections are complete. It is more
complicated than what Bill describes below, but it is along the same
lines. Be more specific and one of us might be able to provide more
specific code.

--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/
 
Thanks for your time everybody. I think David gave me the right explenation:
you can't select in slide show view!!
I try to explain the problem again (I'm not so good in english): there are
three action buttons on a slide. One of them with a link. You have to click
that one to continue. When you've seen some slides you return to the first
slide. Now the second button must have a link to!! and that is what doesn't
work. Sorry I didn't explain it like this before.


So the idea is to force people to view some slides and only then make another
button active so they can go to another section of the show.

This will add a link to slide 3 to the shape named ButtonTwo on Slide 1:
(watch for line breaks)

With
ActivePresentation.Slides(1).Shapes("ButtonTwo").ActionSettings(ppMouseClick)
With .Hyperlink
.Address = ""
.SubAddress = "258,3,3"
End With
.SoundEffect.Type = ppSoundNone
.AnimateAction = msoTrue
End With

But wouldn't it be simpler to leave button two invisible until it's needed?
In other words, suppose:

Slide 1: one button visible, several hidden. Click ButtonOne, it takes you to
a sub-set of slides, maybe 2, 3, 4.

On slide 4 there's a button to take you back to Slide 1. It triggers a macro
like this:

Sub GoBack()
' Make Button Two visible
ActivePresentation.Slides(1).Shapes("ButtonTwo").Visible = True
' Go back to slide 1
SlideShowWindows(1).View.GotoSlide (1)
End Sub

Our free PPT2HTML demo (http://ppt2html.pptools.com) has an accessibility
assistant tool you can use to name shapes and make them visible/invisible.
 
Back
Top